[go: up one dir, main page]

CN101587427B - Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol - Google Patents

Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol Download PDF

Info

Publication number
CN101587427B
CN101587427B CN2008101124082A CN200810112408A CN101587427B CN 101587427 B CN101587427 B CN 101587427B CN 2008101124082 A CN2008101124082 A CN 2008101124082A CN 200810112408 A CN200810112408 A CN 200810112408A CN 101587427 B CN101587427 B CN 101587427B
Authority
CN
China
Prior art keywords
storage card
expansion
command
main frame
read command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2008101124082A
Other languages
Chinese (zh)
Other versions
CN101587427A (en
Inventor
徐璐
闫华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
RDA Microelectronics (Shanghai) Corp. Ltd.
Original Assignee
RDA MICROELECTRONICS (SHANGHAI) CORP Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by RDA MICROELECTRONICS (SHANGHAI) CORP Ltd filed Critical RDA MICROELECTRONICS (SHANGHAI) CORP Ltd
Priority to CN2008101124082A priority Critical patent/CN101587427B/en
Publication of CN101587427A publication Critical patent/CN101587427A/en
Application granted granted Critical
Publication of CN101587427B publication Critical patent/CN101587427B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of SD/MMC storage cards, in particular to a method for realizing control of a storage card by digital equipment by expanding an SD/MMC protocol. The method uses highbits of address bit Argument of reading and writing commands stipulated by the SD/MMC protocol as an identification mark of an expansion command, defines parameters of the expansion command, and cont rols the storage card to perform special operations except for single data reading and writing function by adopting the expansion command. The method is quite simple and feasible, and makes the digital equipment control the storage card to perform specific functions except for single data reading and writing function through the expansion protocol, thereby meeting various special and complex requirements of users on the storage card during use.

Description

A kind of through the method for expansion SD/MMC agreement realization digital equipment to storage card control
Technical field
The present invention relates to SD/MMC storage card field, particularly a kind of through the method for expansion SD/MMC agreement realization digital equipment to storage card control.
Background technology
Present storage cards such as SD/MMC only possess simple memory function, and its all behaviors all are to be controlled by main frame (HOST).Storage card just is used for storing data, and its major function is exactly the storage of data and reads, and main frame sends write order; Storage card carries out write operation according to the address, and main frame sends read command, and storage card is according to address reading data and send main frame to; In addition, storage card does not have characteristics and advantage again.
The disk structure of storage card is as shown in Figure 1, comprises MBS, partition boot sector, FAT table, root directory area, data field, and the major function of each subregion is following:
MBS: MBR (MBR) and hard disk partition table (DPT);
Partition boot sector: partition boot record;
FAT table: file allocation table, be used for the form of log file position, be that the FAT file system is used for recording disc data field bunch chain structure;
Root directory area: deposit the attribute of the file (catalogue) under the root directory, file system is the distribution that unit carries out shared bunch of file directory with 32 bytes, and these 32 bytes define the attribute of the file (or file) under this catalogue with the skew of confirming;
Data field: store files folder and file.
The structure of root directory area is as shown in Figure 2; When some files are operated, according to FAT table search this document place bunch, thereby find the storage address of file data; But these processes of searching are all accomplished by main frame (HOST); It is direct address function that order sends to storage card, is that what file is being operated so storage card can't be known main frame, does not also know it is bunch address upgrading which file when upgrading the FAT table.Main frame (HOST) need upgrade FAT table, directory area and data field in written document; Though what storage card can be judged renewal is any zone; But do not know the data updated content, if there is application need that the data content is dealt with, storage card is just not competent.
Command transfer between main frame and the SD/MMC card such as Fig. 3, shown in Figure 4, main frame (HOST) sends order through cmd signal alignment SD/MMC card, and the SD/MMC cartoon is crossed the cmd signal line the previous order that main frame (HOST) sends is responded.Need the data of transmission to transmit through the DAT signal wire, send the STOP order up to main frame (HOST), the SD/MMC card stops to transmit data.Main frame (HOST) can send a plurality of write orders and a plurality of STOP order when writing a file, storage card can't judge that current STOP orders the end of writing the end of a certain blocks of data or writing whole file.When that is to say when needs carry out true-time operation to a certain file, when for example loading the function of watermark in real time, storage card just can't know when begin executable operations (beginning to add watermark), end operation (stopping to add watermark).
In sum, there is following shortcoming in traditional SD/MMC storage card:
(1) can only be passive accept read write command, the address function data of sending according to main frame;
(2) can't differentiate the data content of operation;
(3) can not carry out special parsing to the order that main frame sends, can only accomplish the function of standard agreement definition;
(4) memory card function is single, can only use as memory device.
Summary of the invention
The objective of the invention is to solve present SD/MMC card can only follow standard agreement and carry out single reading and writing operation; And can not realize the shortcoming of the function of user Geng Gao demand; Provide a kind of and realize digital equipment to the method that the SD/MMC storage card carries out special control, make other special, complicated demand that can realize in this way except that the reading and writing function through expansion SD/MMC agreement.
Technical scheme of the present invention is following: a kind of through the method for expansion SD/MMC agreement realization digital equipment to storage card control; This method utilizes explosion command to come control store to stick into the special operational of row except that single reading and writing data function the identification marking of the high-order position among the address bit Argument of the reading and writing order of SD/MMC agreement defined as explosion command.
Further, realize in digital equipment method to storage card control through expansion SD/MMC agreement that above-mentioned high-order position among the described address bit Argument is meant the address bit that surpasses the storage card max cap..
Aforesaid through the method for expansion SD/MMC agreement realization digital equipment to storage card control; Wherein, To the expansion write order; The high-order position that the definition main frame sends among the address bit Argument of write order of storage card be the identification marking of explosion command, and the parameter of definition explosion command is with the respective extension function of definition storage card execution, after storage card receives write order in the data block that sends storage card with aft engine to; At first judge it is the expansion write order through the high-order position of Argument; Resolve the parameter that is sent to the explosion command in the data block of storage card with aft engine then, and carry out corresponding explosion command according to the parameter of explosion command, the result who executes waits for that main frame reads with the expansion read command.
Aforesaid through the method for expansion SD/MMC agreement realization digital equipment to storage card control; Wherein, to the expansion read command, the high-order position that the definition main frame sends among the address bit Argument of read command of storage card is the identification marking of expansion read command; After storage card receives read command; At first judge it is the expansion read command, leave the execution result of a last explosion command in the data block of returning in then that main frame is fetched this data block through the high-order position of Argument; Data to are wherein resolved, and obtain the execution result of storage card.
Beneficial effect of the present invention is following: this method uses high-order the order that realizes specific function that does not have at present in the address bit to use to expand on the basis that strictly observes the SD/MMC protocol specification; Very simple; Make digital equipment to carry out the specific function except that the reading and writing data, thereby satisfy the user in use to various special, the complicated requirement of storage card through Extended Protocol control store card.
Description of drawings
Fig. 1 is the disk structure synoptic diagram of storage card;
Fig. 2 is the root directory area structural representation of storage card;
Fig. 3 is for writing the transmission course synoptic diagram between main frame and the SD/MMC card;
Fig. 4 is for reading the transmission course synoptic diagram between main frame and the SD/MMC card;
Fig. 5 is the CMD command format of SD/MMC;
Fig. 6 is an argument address parameter synoptic diagram;
Fig. 7 distinguishes the process flow diagram of ordinary instruction and extended instruction for the SD/MMC card.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the present invention is carried out detailed description.
The CMD command format of SD/MMC is as shown in Figure 5, specifies as follows:
● Start bit: start bit is worth and is ' 0 ';
● Transmission bit: the direction host=' 1 ' of expression transmission beginning;
● Command index: command index (the CMD17 monolithic is read, the CMD18 polylith is read, and the CMD24 monolithic is write, the CMD25 polylith is write, and most of main frame HOST are to use CMD18 and CMD25);
● Argument: some order needs argument, and like the reading and writing order, what deposit among this argument is the address;
● the CRC check position of CRC7:7bit;
● End bit: stop bit is worth and is ' 1 '.
The data block size that writes is read in definition at every turn in the CSD of SD/MMC card register, and the computational data block size is by formula 2 READ_BL_LEN, drawing, the span of READ_BL_LEN is 0-15, promptly the data block size is 1Byte-16kByte, 2 15For EXT_CSD uses, according to the agreement regulation of SD/MMC, all cards all must be supported and give tacit consent to and support that operational size is the data block of 512Byte.Main frame (HOST) is when sending out the reading and writing order, and the data block transmitted size is at least 512Byte.
The SD/MMC storage card all is that main frame (HOST) transmission read write command is accomplished when reading and writing data; The read write command form that sends is as shown in Figure 5; Read and write data the address that will operate all transmit with the argument parameter, be 0x00019000 like the argument parameter, to need the address of read-write be 0x00019000 to main frame (HOST) so; Just (it is 102400 that 16 systems 19000 are scaled 10 systems, 102400/512=200) in the 200th sector.
The address of the 32bit of Argument can be to 2 32The disk space of=4G is operated, and if any the needs of Extended Protocol, just expands high-order the identification marking that is used as explosion command that does not have in 32 bit address to use and uses.If the max cap. of storage card is 1G, in to the data manipulation of storage card, only need to use 30 address space (2 so 30=therefore 1G), (bit31 is bit32) as the identification marking of explosion command can to utilize the high 2bit that do not use.The read write command agreement of expansion SD/MMC is actual to be exactly to utilize high-order that not have in the address bit of command transfer to use; The address bit that promptly surpasses the storage card max cap. is used as the identification marking of explosion command, and main frame (HOST) utilizes explosion command to come control store to stick into some special operations of row.These special operations can define arbitrarily as required, and are unfixing.As shown in Figure 7, storage card judges whether it is explosion command through high-order position after receiving the order that main frame sends, if not then according to normal read write command flow processing, if then according to the flow processing of explosion command.
To the expansion write order; The high-order position that does not have to use that at first utilizes the argument in the write order is as the identification marking of expanding write order, and for example, the max cap. of storage card is 1G; The address argument of the write order that transmits is defined as 0x40000200; Expansion bit30 is 1, is defined as the expansion write order, and the concrete explosion command parameter of definition data block of utilizing main frame (HOST) to send storage card to then defines concrete explosion command and carries out corresponding expanded function with the notice storage card.Receive when storage card that at first to judge behind the write order of this address be the expansion write order, and parse the command parameter in the data block of receiving subsequently, carry out corresponding explosion command according to command parameter then.Storage card is not carried out write order in fact veritably after receiving above-mentioned write order, but carries out expanded function according to the explosion command of definition, and the result who executes waits for that main frame (HOST) gets with the expansion read command.Above-mentioned concrete explosion command parameter and explosion command can define arbitrarily as required, and main frame and storage card are followed corresponding definition just can realize the expanded function except that read-write operation.
Operation to the expansion read command; Utilize the identification marking of the high-order position of the argument in the read command as the expansion read command; For example the address argument in the read command is defined as 0x40000200, and expansion bit30 is 1, is defined as the execution result of fetching an explosion command., storage card at first judges it is the expansion read command when receiving the read command of this address; Leave the execution result of a last explosion command in the data block of returning in then; Main frame (HOST) is fetched this data block, and data are wherein resolved, and obtains the execution result of storage card.
For example: accomplish the safety certification between main frame and the storage card when a certain application need powers on; If authentication not through could not carry out read-write operation to card; The Argument value that defines write order so is the identification marking of 0x40000200 as explosion command; And send at main frame that definition explosion command parameter is authentication command in the data block of storage card to; After being stuck in the CMD that receives the main frame transmission, at first judge it is the expansion write order, judge it is authentication command according to the explosion command parameter in the data block then through Argument; Then storage card just jumps to the treatment scheme execution main frame of authentication command and the authentication operation between the storage card, and main frame is fetched the execution result of authentication command through the expansion read command then.Authentication between main frame and the storage card is operated through just carrying out normal read-write between aft engine and the storage card, otherwise can not carry out normal read-write operation.Common read write command is to carry out such specific function, has only the explosion command of use to accomplish.
Consider the description of this invention disclosed herein and special embodiment, other embodiment of the present invention are conspicuous for a person skilled in the art.These explanations and embodiment only consider as an example that they all belong to by within the indicated protection scope of the present invention and spirit of accompanying claims.

Claims (4)

1. one kind is passed through the method that expansion SD/MMC agreement realization digital equipment is controlled storage card; It is characterized in that: this method utilizes explosion command to come control store to stick into the special operational of row except that single reading and writing data function the identification marking of the high-order position among the address bit Argument of the reading and writing order of SD/MMC agreement defined as explosion command; High-order position among the described address bit Argument is meant and surpasses the address bit storage card max cap., that do not use.
2. as claimed in claim 1 through the method for expansion SD/MMC agreement realization digital equipment to storage card control; It is characterized in that: to the expansion write order; The high-order position that the definition main frame sends among the address bit Argument of write order of storage card is the identification marking of explosion command; The respective extension function that the parameter of definition explosion command is carried out with the definition storage card in the data block that sends storage card with aft engine to; After storage card receives write order, at first judge it is the expansion write order through the high-order position of Argument, resolve the parameter that is sent to the explosion command in the data block of storage card with aft engine then; And carrying out corresponding explosion command according to the parameter of explosion command, the result who executes waits for that main frame reads with the expansion read command.
3. as claimed in claim 1 through the method for expansion SD/MMC agreement realization digital equipment to storage card control; It is characterized in that: to the expansion read command; The high-order position that the definition main frame sends among the address bit Argument of read command of storage card is the identification marking of expansion read command, after storage card receives read command, at first judges it is the expansion read command through the high-order position of Argument; Leave the execution result of a last explosion command in the data block of returning in then; Main frame is fetched this data block, and data are wherein resolved, and obtains the execution result of storage card.
4. as claimed in claim 2 through the method for expansion SD/MMC agreement realization digital equipment to storage card control; It is characterized in that: to the expansion read command; The high-order position that the definition main frame sends among the address bit Argument of read command of storage card is the identification marking of expansion read command, after storage card receives read command, at first judges it is the expansion read command through the high-order position of Argument; Leave the execution result of a last explosion command in the data block of returning in then; Main frame is fetched this data block, and data are wherein resolved, and obtains the execution result of storage card.
CN2008101124082A 2008-05-23 2008-05-23 Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol Active CN101587427B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101124082A CN101587427B (en) 2008-05-23 2008-05-23 Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101124082A CN101587427B (en) 2008-05-23 2008-05-23 Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol

Publications (2)

Publication Number Publication Date
CN101587427A CN101587427A (en) 2009-11-25
CN101587427B true CN101587427B (en) 2012-05-30

Family

ID=41371685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101124082A Active CN101587427B (en) 2008-05-23 2008-05-23 Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol

Country Status (1)

Country Link
CN (1) CN101587427B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103703B (en) * 2009-12-18 2012-10-31 上海华虹集成电路有限责任公司 Method for parsing SD card commands
CN102541476B (en) * 2010-12-28 2015-03-11 普天信息技术研究院有限公司 Method and device for intelligent memory card interface communication
US10866746B2 (en) * 2017-12-28 2020-12-15 Silicon Motion Inc. Memory addressing methods and associated controller, memory device and host
CN112069147B (en) * 2020-11-16 2021-01-29 湖南源科创新科技有限公司 FAT sharing system and sharing method for multi-host FAT file system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201041643Y (en) * 2007-02-09 2008-03-26 凤凰微电子(中国)有限公司 An intelligent card reading connection device
CN201057647Y (en) * 2006-10-23 2008-05-07 北京飞天诚信科技有限公司 Composite apparatus with variable memory power and identity authentication function

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201057647Y (en) * 2006-10-23 2008-05-07 北京飞天诚信科技有限公司 Composite apparatus with variable memory power and identity authentication function
CN201041643Y (en) * 2007-02-09 2008-03-26 凤凰微电子(中国)有限公司 An intelligent card reading connection device

Also Published As

Publication number Publication date
CN101587427A (en) 2009-11-25

Similar Documents

Publication Publication Date Title
US7966355B2 (en) Interface for extending functionality of memory cards
CN104360967B (en) The control method of accumulator system, console controller and DMA
JP2015057726A (en) Method for utilizing memory interface to control partitioning of memory module
US20110258372A1 (en) Memory device, host device, and memory system
JP3866635B2 (en) Memory card and storage area switching method
CN106030498A (en) Storage device, data processing method, and storage system
US20140156913A1 (en) Data processing method, memory controller and memory storage apparatus
TW201329712A (en) Data processing method, memory controller and memory storage device
CN101587427B (en) Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol
WO2017132797A1 (en) Data arrangement method, storage apparatus, storage controller and storage array
KR100725271B1 (en) USB-SD storage device having a plurality of DMA channels and a storage method thereof
US20080288710A1 (en) Semiconductor Memory Device and Its Control Method
CN102654870A (en) Data protection method based on fat32 file system format
CN112181275B (en) A data processor and a data processing method
CN112764673B (en) Hyperspectral linear array data storage rate optimization method, device and storage medium
KR20230144078A (en) Method and apparatus for performing memory operations
CN103177019A (en) Universal serial bus (USB) storage device and driving method thereof
US10642494B2 (en) Method, electronic device and computer program product for data processing
CN103914263A (en) SD card and device and method for accessing SD card
US20070055819A1 (en) Information recording medium and its control method
US11249895B2 (en) Memory controller and memory system
KR20130009536A (en) Memory control device and method
CN101493844A (en) Method and apparatus for implementing multiple main interfaces for embedded memory
KR101165966B1 (en) Memory system being accessed as a synchronous mode or an asynchronous mode by command
CN108121667B (en) Data erasing method and device and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: RDA MICROELECTRONICS (SHANGHAI) CO., LTD.

Free format text: FORMER OWNER: PHOENIX MICROELECTRONICS (CHINA) CO., LTD.

Effective date: 20100422

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100084 18/F, TOWER A, SCIENCE BUILDING, QINGHUA SCIENCE PARK, ZHONGGUANCUN EAST ROAD, HAIDIAN DISTRICT, BEIJING CITY TO: 201203 ROOM 302, BUILDING 2, NO.690, BIBO ROAD, ZHANGJIANG HIGH-TECH PARK, SHANGHAI CITY

TA01 Transfer of patent application right

Effective date of registration: 20100422

Address after: 201203. Room 2, building 690, No. 302 blue wave road, Zhangjiang hi tech park, Shanghai

Applicant after: RDA Microelectronics (Shanghai) Corp. Ltd.

Address before: 100084, Beijing Road, Zhongguancun, Haidian District science and Technology Park, Tsinghua Science and technology building, block A, 18

Applicant before: Poenix Mcroelectronic (China) Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant