Page 2
Corporation general policy does not recommend the use of its products in life support applications where in a failure or malfunction of the product may directly threaten life or injury. Per SanDisk Terms and Conditions of Sale, the user of SanDisk products in life support applications assumes all risk of such use and indemnifies SanDisk against all damages.
SD Card Interface, an alternate communication protocol based on the SPI standard. Currently, the SanDisk SD Card provides up to 1024 million bytes of memory using flash memory chips, which were designed especially for use in mass storage applications. In...
►Application-specific commands ►Comfortable erase mechanism SD Card Standard SanDisk SD cards are fully compatible with the SD Card Physical Layer System Specification, Version 1.10. This specification is available from the SD Card Association. SD Association 719 San Benito St., Suite C...
Power management for low-power operation Independent Flash Technology The 512-byte sector size of the SanDisk SD Card is the same as that in an IDE magnetic disk drive. To write or read a sector (or multiple sectors), the host computer software simply issues a read or write command to the SD Card.
1.10 Automatic Sleep Mode A unique feature of the SanDisk SD Card is automatic entrance and exit from sleep mode. Upon completion of an operation, the card enters the sleep mode to conserve power if no further commands are received in less than five milliseconds (ms). The host does not have to take any action for this to occur.
Chapter 1 – Introduction Revision 2.2 SanDisk SD Card Product Manual 1.11 Hot Insertion Support for hot insertion will be required on the host but will be supported through the connector. Connector manufacturers will provide connectors that have power-pins long enough to be powered before contact is made with the other pins.
Page 10
1.12.5 Memory Array Partitioning The basic unit of data transfer to/from the SanDisk SD Card is one byte. All data transfer operations that require a block size always define block lengths as integer multiples of bytes. Some special functions need other partition granularity. Figure 1-2 shows the Memory Array Partitioning.
Page 12
Chapter 1 – Introduction Revision 2.2 SanDisk SD Card Product Manual Part No. Block Data Area + Protected Area size User Area Size Protected size (Blocks) (Blocks0 (Bytes) (Blocks) SDSDJ-32 60,512 59,776 SDSDB-16 29,152 28,800 1.12.6 Read/Write Operations The SD Card supports two read/write modes as shown in Figure 1-3 and defined in Table 1-2.
Chapter 1 – Introduction Revision 2.2 SanDisk SD Card Product Manual 1.12.8 Data Protection in the Flash Card Every sector is protected with an error correction code (ECC). The ECC is generated (in the memory card) when the sectors are written and validated when the data is read. If defects are found, the data is corrected prior to transmission to the host.
Page 14
Chapter 1 – Introduction Revision 2.2 SanDisk SD Card Product Manual Function Description Card Status In SPI mode, only 16 bits containing errors relevant to SPI mode can be read out of the 32-bit Status Register. The SD_STATUS can be read using ACMD13, the same as in SD mode.
Overview In this section, all values are defined at an ambient temperature and nominal supply voltage unless otherwise stated. System Environmental Specifications Table 2-1 defines the environmental specifications for the SanDisk SD Card. Table 2-1 Environmental Specification Summary Temperature Operating -25°...
Chapter 2 – Product Specifications Revision 2.2 SanDisk SD Card Product Manual Typical Card Power Requirements Table 2-3 Card Power Requirements (Ta=25°C@3.0V) VDD (ripple: max, 60mV peak-to-peak) 2.7 V – 3.6 V Value Measurement Average Sleep Read Write System Performance All performance values for the SD Card in Table 2-4 are under the following conditions: Voltage range 2.7 V to 3.6 V...
SD Card Interface Description General Description of Pins and Registers The SanDisk SD Card has nine exposed contacts on one side as shown in Figure 3-1. The host is connected to the card using a dedicated 9-pin connector. Table 3-1 SD Card Pad Assignment Pin No.
The 32-bit Operation Conditions Register (OCR) stores the V voltage profile of the SanDisk SD Card. The card is capable of executing the voltage recognition procedure (CMD1) with any standard SD Card host using operating voltages from 2 to 3.6 V.
The CID Register in the SD Card has a different structure than in the MultiMediaCard. 3C represents the three SDA founding companies: Toshiba, SanDisk, and MEI. The product revision is composed of two binary-coded decimal (BCD) digits (4 bits ea.) representing and “n.m”...
SD Security Specification. The security protected area size is defined by SanDisk as approximately one percent of the total size of the card. Tables 3-31 and 3-32 describe the user and protected areas for all SanDisk SD Cards.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual SD Card Protocol Description SD Bus Protocol Communication over the SD bus is based on command and data bit streams, which are initiated by a start bit and terminated, by a stop bit: Command—token that starts an operation.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Figure 4-2 Multiple Block Read Operation From host From card to card(s) to host Data from "Stop" command stops card to data transfer host Command Command...
Page 47
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Each command token is preceded by a start bit (0) and succeeded by an end bit (1). The total length is 48 bits. CRC bits protect each token to detect transmission errors; the operation may be repeated.
All SD Card commands, together with corresponding responses, state transitions, error conditions, and timings are presented in the following sections. The SanDisk SD Card has two operation modes. Card Identification Mode— The host will be in card identification mode after reset and while it is looking for new cards on the bus.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Figure 4-7 SD Memory Card State Diagram—Card Identification Mode Power On SPI Operation CMD0 Mode CS Asserted (0) From all states Idle State (idle) CMD0 except "ina"...
Page 50
This query should be used if the host can select a common voltage range or wants to notify the application of non-usable cards in the stack. The SanDisk SD Card can use the busy bit in the ACMD41 response to tell the host that it is still working on its power-up/reset procedure (e.g., downloading the register information from memory field) and is not ready for communication.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual When the RCA is received, the card state changes to stand-by. At this point, if the host wants the card to have another RCA number, it may ask the card to publish a new number by sending another SEND_RELATIVE_ADDR command to the card.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual CMD7 is issued with the reserved relative card address “0x0000,” all cards transfer back to Stand-by State. This may be used before identifying new cards without resetting other already registered cards.
Page 53
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual A card can be re-selected while in the Disconnect State, using CMD7. In that case, the card will move to the Programming State and reactivate the busy indication.
Page 54
1-bit or 4-bit CRC appended to the end of each block by the host. SanDisk SD cards that support block-write are require the block length, set by CMD16, to be 512 bytes regardless of whether WRITE_BL_LEN is set to 1k or 2kBytes.
Page 55
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual whether the write process is still in progress). The host may deselect the card by issuing CMD7 (to select a different card) that will displace the card into the Disconnect State and release the DAT line without interrupting the write operation.
Page 56
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Mechanical Write Protect Switch A mechanical sliding tablet on the side of the card (refer to the mechanical description), controlled by the user, indicates whether or not a given card is write-protected. If the sliding tablet is in the position of the window open, it means the card is write-protected.
Page 57
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Table 4-4 Lock Card Data Structure Bit Descriptions Bit Name Description ERASE 1’ Defines Forced Erase Operation. In byte 0 bit 3 will be set to “1” (all other bits shall be ‘0’).
Page 58
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual 2. Define the block length (CMD16), given by the 8-bit card lock/unlock mode, the 8- bit password size (in bytes), and the number of bytes of the currently used password.
Page 59
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Force Erase In case the user forgets the password (the PWD content) it is possible to erase all card data content along with the PWD content. This operation is called Forced Erase.
Page 60
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Table 4-5 Lock/Unlock Function (basic sequence for CMD42) CMD42 Parameter Current PWD_LEN Result of the Card Status Card State and PWD Function Bit3 Bit2 Bit1 Bit0...
Page 61
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Two types of Lock/Unlock Card There will be two types of lock / unlock function-supported cards. Type 1 is an older version of the SD Card, and Type 2 is the new version defined in this specification (v1.10).
Page 62
CARD_IS_LOCKED in the response of CMD7 or CMD13. 4.4.8 Application-specific Commands The SanDisk SD Card is defined to be protocol-forward-compatible to the MultiMediaCard Standard. The SD Card system is designed to provide a standard interface for a variety application types. In order to keep future compatibility to the MultiMediaCard standard together with Write Protection PWP: Permanent Write Protect (CSD bit13).
Page 63
CMD56. The data block size is the BLOCK_LEN that was defined with CMD16. The response to CMD56 will be R1. Currently, there are no defined commands or usage for CMD56 in SanDisk’s SD Card, but new commands may be easily defined and tailored for OEM application-specific requirements (upon request to SanDisk).
Page 64
CMD0 to reset a card will cause it to reset to Idle State and all functions switch back to the default. As a response to CMD6, the SanDisk SD Card will send an R1 response on the CMD line, and 512 bits of status on the DAT lines. The SD bus transaction considers this a standard single block read transaction and the time-out value of this command is 100ms, same as in read command.
Page 65
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Figure 4-9 Use of Switch Command Check Function (Mode=0) CMD6 Status Data Card internal Function change timing: execution within 8 clocks Switch Function (Mode=1) CMD6 Status Data...
Page 66
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Mode 1 Operation—Set Function CMD6 is used in Mode 1 to switch the functionality of the card. Switching to a new functionality is accomplished by performing the following actions.
Page 67
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Switch Function Status The switch function status is the returned data block that contains function and current consumption information. The block length is predefined to 512 bits and the use of SET_BLK_LEN command is not necessary.
Page 68
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual 4.4.10 Relationship between CMD6 Data and Other Commands The card may accept the commands using only CMD line (CMD12, CMD13, etc.) during the CMD6 transaction but its response and result is undefined.
Page 69
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Switch Function Flow Example The host is recommended to take the following flow for switching the function. Figure 4-12 Switch Function Flow Start Spec 1.0-1.10 CMD6 Card version no.?
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual The host drives only one card, because it is not possible to control two cards or more if each of them has a different timing mode (Default and High-Speed). In order to satisfy severe timing, the CLK/CMD/DAT signal will be connected one-to-one between host and card.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual The clock must be running for the card to output data or response tokens. After the last bus transaction, the host is required, to provide eight clock cycles for the card to complete the operation before shutting down the clock.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual 4.6.2 CRC16 The CRC16 is used for payload protection in block transfer mode when on DAT line is used. The CRC checksum is a 16-bit value and is computed as follows:...
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual 4.7.2 Read, Write and Erase Time-out Conditions The period after which a time-out condition for read/write/erase operations occurs is (card independent) either 100 times longer than the typical access times for the operations given in Table 4-6 or 100 ms (whichever is lower).
Page 77
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual CMD Index Type Argument Resp. Abbreviation Description CMD3 [31:0]stuff SEND_RELATIVE_ADDR Asks the card to publish bits a new relative address CMD4 [31:0]stuff SET_DSR Programs the DSR of all...
Page 78
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual CMD Index Type Argument Resp. Abbreviation Description CSD. CMD17 adtc [31:0] data READ_SINGLE_BLOCK Reads a block of the address size selected by the SET_BLOCKLEN command. CMD18...
Page 79
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual CMD Index Type Argument Resp. Abbreviation Description (representing 32 write- protect groups starting at the specified address) followed by 16 CRC bits are transferred in a payload format via the data line.
Page 80
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual CMD Index Type Argument Resp. Abbreviation Description CMD43 … Reserved CMD51 Application-specific Commands (Class 8) CMD55 [31:16] APP_CMD Indicates to the card that RCA [15:0] the next command is an...
Page 81
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual CMD Index Type Argument Resp. Abbreviation Description CMD57 Application-Specific Commands All future reserved commands will have a codeword length of 48 bits, as well as their responses (if there are any).
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual ACMD Index Type Argument Resp. Abbreviation Command Description ACMD42 [31:1] stuff SET_CLR_CARD_DETECT Connect[1]/Disconnect[0] bits [0] the 50KOhm pull-up set_cd resistor on CD/DAT3 (pin 1) of the card.
Page 83
ACMD18, 25, Refer to the SD Card Security Specification for an explanation of the SD Security features. 26, 38, 43, 44, The SanDisk SD Card supports all the security-related commands as explained in the 45, 46, 47, 48, specification. ACMD41, card...
Page 84
All responses except for the type R3 are protected by a CRC. The end bit (1) terminates every response. There are five types of responses supported in the SanDisk SD Card. Their formats are defined as follows: 1) R1 (standard response): response length 48 bit.
Page 85
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual 2) R1b is identical to R1 with the additional busy signal transmitted on the data line. 3) R2 (CID, CSD register): response length 136 bits. The content of the CID Register is sent as a response to CMD2 and CMD10. The content of the CSD Register is sent as a response to CMD9.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Data Transfer Mode There is just one Z bit period followed by P bits pushed up by the responding card. This timing diagram is relevant for all responded host commands except CMD1, 2, 3.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Multiple Block Read In multiple-block read mode, the card sends a continuous flow of data blocks following the initial host read command. The data flow is terminated by a stop transmission command, CMD12.
Page 89
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual If the SD Card does not have a free data receive buffer, it indicates this condition by pulling down the data line to low. The card stops pulling down the data line as soon as at least one receive buffer for the defined data transfer block length becomes free.
Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Stop Transmission Received after Last Data Block—Card Busy Programming Cycles Host Command Card Response Host Command Content Z Z P T Content Content Card is Programming...
SPI Protocol SPI Bus Protocol Although the SanDisk SD Card channel is based on command and data bit-streams initiated by a start bit and terminated by a stop bit, the SPI channel is byte-oriented. Every command or data block is built of eight-bit bytes and byte aligned (multiples of eight clocks) to the CS signal.
The bus frequency can be changed at any time (under the restrictions of maximum data transfer frequency, defined by the SD cards). It is an obvious requirement that the clock must be running for the SanDisk SD Card to output data or response tokens. After the last SPI bus transaction, the host is required to provide 8 (eight) clock cycles for the card to complete the operation before shutting down the clock.
Page 111
Appendix A –Ordering Information Revision 2.2 SanDisk SD Card Product Manual Appendix A Ordering Information SD Card To order SanDisk products directly from SanDisk, call (408) 542-0595. Part Number Block Size SDSDB-16 16 MB SDSDJ-32 32 MB SDSDJ-64 64 MB...
Page 112
Appendix B –SanDisk Worldwide Sales Offices Revision 2.2 SanDisk SD Card Product Manual Appendix B SanDisk Worldwide Sales Offices To order SanDisk products directly from SanDisk, call (408) 542-0595. SanDisk Corporate Headquarters International Industrial/OEM Sales Offices 140 Caspian Court Europe...
Page 113
III. WHAT THIS WARRANTY COVERS For products found to be defective within one year of purchase, SanDisk will have the option of repairing or replacing the defective product, if the following conditions are met: A. A warranty registration card for each defective product was submitted and is on file at SanDisk.
Page 114
SanDisk may, at its discretion, ship repaired or rebuilt products identified in the same way as new products, provided such cards meet or exceed the same published specifications as new products.
SanDisk shall not be liable for any loss, injury or damage caused by use of the Products in any of the following applications: Special applications such as military related equipment, nuclear reactor control, and...
Page 117
Host Design Considerations: NAND MMC and SD-based Products Application Note Version 1.0 Document No. 80-11-00160 September 30, 2002 SanDisk Corporation Corporate Headquarters • 140 Caspian Court • Sunnyvale, CA 94089 Phone (408) 542-0500 • Fax (408) 542-0503 www.sandisk.com...
Page 118
Per SanDisk Terms and Conditions of Sale, the user of SanDisk products in life support applications assumes all risk of such use and indemnifies SanDisk against all damages.
Revision 1.0 Introduction SanDisk’s MultiMediaCard (MMC) and Secure Digital (SD) Card have been designed into a wide variety of consumer electronic products: MP3 players, cell phones, PDAs, digital still and video cameras, data loggers, and more. Although these cards were designed to support this wide range of products, there are many options an engineer needs to consider before designing a card slot into a product.
SD Card will not physically fit into an MMC socket. File System Support If a design needs to support a file system, such as SanDisk’s Host Developers Tool Kit (HDTK), additional considerations are necessary. Reading and writing to an SD Card and MultiMediaCard is generally done in 512 byte blocks, however, erasing often occurs in much larger blocks.