SanDisk SDSDB-016G-A11 Product Manual

SanDisk SDSDB-016G-A11 Product Manual

Sd card
Table of Contents

Advertisement

SanDisk SD Card
Product Manual
Version 2.2
Document No. 80-13-00169
November 2004
SanDisk Corporation
Corporate Headquarters • 140 Caspian Court • Sunnyvale, CA 94089
Phone (408) 542-0500 • Fax (408) 542-0503
www.sandisk.com

Advertisement

Table of Contents
loading

Summary of Contents for SanDisk SDSDB-016G-A11

  • Page 1 SanDisk SD Card Product Manual Version 2.2 Document No. 80-13-00169 November 2004 SanDisk Corporation Corporate Headquarters • 140 Caspian Court • Sunnyvale, CA 94089 Phone (408) 542-0500 • Fax (408) 542-0503 www.sandisk.com...
  • 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.
  • Page 3: Table Of Contents

    Revision 2.2 SanDisk SD Card Product Manual TABLE OF CONTENTS 1. Introduction....................1-1 1.1 General Description ................1-1 1.2 Features....................1-2 1.3 SD Card Standard ...................1-2 1.4 Functional Description................1-3 1.5 Independent Flash Technology ...............1-3 1.6 Defect and Error Management..............1-3 1.7 Copyright Protection................1-4 1.8 Endurance ....................1-4 1.9 Wear Leveling..................1-4...
  • Page 4 5.25 SPI Electrical Interface ................5-20 5.26 SPI Bus Operating Conditions.............5-20 5.27 Bus Timing ..................5-20 Appendix A Ordering Information...............A-1 Appendix B SanDisk Worldwide Sales Offices........... B-1 Appendix C Limited Warranty..............C-1 Appendix D Disclaimer of Liability ............D-1 Appendix E Application Note..............E-1...
  • Page 5: Introduction

    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...
  • Page 6: Features

    ►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...
  • Page 7: Functional Description

    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.
  • Page 8: Copyright Protection

    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.
  • Page 9: Hot Insertion

    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 11: Memory Array Partitioning

    Chapter 1 – Introduction Revision 2.2 SanDisk SD Card Product Manual Figure 1-2 Memory Array Partitioning SanDisk SD Memory Card WP Group 0 Bloc Bloc Bloc Bloc Sector 1 Sector 2 Sector 3 Sector n WP Group 1 WP Group 2...
  • 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.
  • Page 13: Spi Mode

    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.
  • Page 15: Product Specifications

    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°...
  • Page 16: Typical Card Power Requirements

    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...
  • Page 17: Physical Specifications

    Chapter 2 – Product Specifications Revision 2.2 SanDisk SD Card Product Manual Physical Specifications Refer to Table 2-6 and Figure 2-1 for SD card’s physical specifications and dimensions. Table 2-6 SD Memory Card Physical Specification Summary Specification SD Card Weight 2.0 g.
  • Page 18 Chapter 2 – Product Specifications Revision 2.2 SanDisk SD Card Product Manual Figure 2-2 SD Memory Card Dimensions © 2004 SanDisk Corporation 12/08/04...
  • Page 19: Capacity Specifications

    Chapter 2 – Product Specifications Revision 2.2 SanDisk SD Card Product Manual Figure 2-3 SD Memory Card Dimensions (Top View) Capacity Specifications Table 2-7 shows the specific capacity for the various models. Table 2-7 Model Capacity Summary Model No. Capacity...
  • Page 20 Chapter 2 – Product Specifications Revision 2.2 SanDisk SD Card Product Manual Model No. Capacity SDSDJ-1024 1024 MB SDSDH-1024 1024 MB SDSDX3-1024 1024 MB SDSDJ-2048 2048 MB SDSDH-2048 2048 MB © 2004 SanDisk Corporation 12/08/04...
  • Page 21: Sd Card Interface Description

    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.
  • Page 22 The GO_IDLE (CMD0) command can also reset the card. Figure 3-1 SD Card Architecture The RCA Register is not available in SPI mode. © 2004 SanDisk Corporation 12/08/04...
  • Page 23: Sd Bus Topology

    Figure 3-2 shows the bus topology of several cards with one host in SD Bus mode. Figure 3-2 SD Card System Bus Topology HOST SD Memory Card (A) D0-D3, CMD D0-3(A), CMD(A) SD Memory Card (B) D0-3(B), D0-D3, CMD CMD(B) MultiMediaCard D0, CS, CMD D0-3(C) D1&D2 Not CMD(C) Connected © 2004 SanDisk Corporation 12/08/04...
  • Page 24 Also, the inserted card must be properly reset when CLK carries a clock frequency f If the hot insertion feature is implemented in the host, the host must withstand a shortcut between V and V without damage. © 2004 SanDisk Corporation 12/08/04...
  • Page 25: Spi Bus Topology

    In the multi block write operation a Stop Transmission token is sent as the first byte of the data block. Figure 3-4 SD Card Bus System Power Supply SPI Bus Master SPI Bus (CLK, DataIn, DataOut) SPI Card SPI Card © 2004 SanDisk Corporation 12/08/04...
  • Page 26: Electrical Interface

    SD Card s, the bus length and the power supply unit, the host must ensure that the power is built up to the operating level (the same level which will be specified in ACMD41) before ACMD41 is transmitted. © 2004 SanDisk Corporation 12/08/04...
  • Page 27 30 pF for up to 10 cards, and 40 pF for up to 30 cards, the values in Table 3-4 must not be exceeded. The current consumption of any card during the power-up procedure must not exceed 10 mA. © 2004 SanDisk Corporation 12/08/04...
  • Page 28: Bus Signal Levels

    +0.3 Input low voltage -0.3 0.25*V The total capacitance of CMD and DAT lines will consist of C , and one C only because they are HOST CARD connected separately to the SD Card host. © 2004 SanDisk Corporation 12/08/04...
  • Page 29 < 25 pF (1 card) Outputs CMD, DAT – referenced to CLK Low frequency required for MMC compatibility. 0 Hz stops clock—given min. freq. range is for cases in which a continuous clock is required. © 2004 SanDisk Corporation 12/08/04...
  • Page 30 Clock Rise Time Clock Fall Time Inputs CMD, DAT – referenced to CLK Input setup time Input hold time Outputs CMD, DAT – referenced to CLK Output delay time during Data ODLY Transfer mode © 2004 SanDisk Corporation 3-10 12/08/04...
  • Page 31: Sd Card Registers

    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.
  • Page 32: Card Identification Register

    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”...
  • Page 33: Card Specific Data Register

    F13h 128 MB F03h 64 MB EDFh 32 MB 74Bh 16 MB 383h VDD_R_ [61:59] 100 mA 111b Max. read CURR_MIN current @VDD min. VDD_R_ [58:56] 80 mA 110b Max. read CURR_MAX current @VDD © 2004 SanDisk Corporation 3-13 12/08/04...
  • Page 34 PERM_ [13:13] Not protected Permanent WRITE_ write protection PROTECT TMP_WRITE_ [12:12] Not protected Temporary write PROTECT protection FILE_ [11:10] HD w/partition File format FORMAT Reserved [9:8] Reserved [7:1] CRC7 [0:0] Not used, always “1” © 2004 SanDisk Corporation 3-14 12/08/04...
  • Page 35 CCC—The SD Card command set is divided into subsets (command classes). The Card Command Class Register (CCC) defines which command classes are supported by this card. A value of “1” in a CCC bit means that the corresponding command class is supported. © 2004 SanDisk Corporation 3-15 12/08/04...
  • Page 36 The size of the memory block is defined in READ_BL_LEN. Table 3-19 Bit Definition READ_BLK_MISALIGN Definition Crossing physical block boundaries is invalid. Crossing physical block boundaries is allowed. © 2004 SanDisk Corporation 3-16 12/08/04...
  • Page 37 0=1 mA, 1=5 mA, 2=10 mA, 3=25 mA, 4=35 mA, 5=45 mA, 6=80 mA, 7=200 C_SIZE_MULT (Device Size Multiplier)—codes a factor MULT for computing the C_SIZE_MULT+2 total device size (see C_SIZE). The factor MULT is defined as 2 © 2004 SanDisk Corporation 3-17 12/08/04...
  • Page 38 WRITE_BL_LEN . The maximum block length might therefore be in the range 512…2048 bytes. A 512-byte write block length is always supported. In the SD Memory Card, the WRITE_BL_LEN is always equal to READ_BL_LEN. © 2004 SanDisk Corporation 3-18 12/08/04...
  • Page 39 Universal file format. Others/unknown. 0, 1, 2, 3 Reserved. CRC—carries the checksum for the CSD content. The host must recalculate the checksum for any CSD modification. The default corresponds to the initial CSD contents. © 2004 SanDisk Corporation 3-19 12/08/04...
  • Page 40: Status Register

    E R X 0 = success Card internal ECC was FAILED 1 = failure applied but failed to correct the data. CC_ERROR E R X 0 = no error Internal card controller error 1 = error © 2004 SanDisk Corporation 3-20 12/08/04...
  • Page 41 ACMD. AKE_SEQ_ 0 = no error Error in the sequence of ERROR 1 = error authentication process. Reserved for application-specific commands Reserved for manufacturer test mode © 2004 SanDisk Corporation 3-21 12/08/04...
  • Page 42: Sd Status Register

    The 16-bit Relative Card Address (RCA) Register carries the card address that is published by the card during the card identification. This address is used for the addressed host-card communication after the card identification procedure. © 2004 SanDisk Corporation 3-22 12/08/04...
  • Page 43: Data Interchange Format And Card Sizes

    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.
  • Page 44 Number of Total Partition User Data User Data LBAs Partition Sectors Sectors Bytes System Area Sectors 512 MB 10,240 10,213 10,176 5,210,112 1 GB 20,480 20,421 20,384 10,436,608 2 GB 40,960 40,905 40,864 20,922,368 © 2004 SanDisk Corporation 3-24 12/08/04...
  • Page 45: Sd Card Protocol Description

    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.
  • Page 46: Sd Card Protocol Description

    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.
  • Page 48: Card Identification Mode

    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.
  • Page 49: Card Identification Mode

    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.
  • Page 51: Data Transfer Mode

    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.
  • Page 52: Data Transfer Mode

    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.?
  • Page 70 Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Case (2) – Check function with error CMD6 argument = ‘0000 0000 1111 1000 1111 0010 0000 0001’ Read Data = [511:496] = ‘0000 0000 0000 0000’ (means error) [495:400] = ‘1000 0000 0000 0001’...
  • Page 71: Clock Control

    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.
  • Page 72: Cyclic Redundancy Codes

    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.
  • Page 73: Error Conditions

    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:...
  • Page 74: Commands

    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 75: Command Format

    Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual 4.8.2 Command Format The command length shown in Figure 4-15 is 48 bits. Figure 4-15 Format (1.92 µs @ 25 MHz) bit 5….bit 0 bit 31….bit 0 bit 6….bit 0...
  • Page 76: Command Description

    Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual Class Basic Block Block Erase Write Lock App- Switch Read Write Protec Card Specific Mode tion CMD28 CMD29 CMD30 CMD32 CMD33 CMD34 CMD37 CMD38 CMD42 CMD50...
  • 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).
  • Page 82: Card State Transition

    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.
  • Page 86: Timing Diagrams

    Chapter 4 – SD Card Protocol Description Revision 2.2 SanDisk SD Card Product Manual 4.10 Timing Diagrams All timing diagrams use schematics and abbreviations listed in Table 4-23. Table 4-23 Timing Diagram Symbols Symbol Definition Start Bit (= 0) Transmitter Bit (Host = 1, Card = 0)
  • Page 87: Data Read

    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.
  • Page 88: Data Write

    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.
  • Page 90: Timing Values

    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...
  • Page 91: Sd Bus Protocol

    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.
  • Page 92: Bus Transfer Protection

    In case of data retrieval error, the card will not transmit any data. Instead, a special data error token will be sent to the host. Figure 5-2 shows a data read operation, which terminated with an error token rather than a data block. © 2004 SanDisk Corporation 12/08/04...
  • Page 93: Data Write

    Single Block Write Operation Data response Data from and busy Start block host to From host from card From card command token card to card to host from host DataIn Command Data Block Command Response Response DataOut Busy © 2004 SanDisk Corporation 12/08/04...
  • Page 94: Erase And Write Protect Management

    SD Bus mode. While the card is erasing or changing the write protection bits of the predefined sector list it will be in a busy state and will hold the dataOut line low. Figure 5-6 illustrates a “no data” bus transaction with and without busy signaling. © 2004 SanDisk Corporation 12/08/04...
  • Page 95: Read Cid/Csd Registers

    The usage of CMD58 is not restricted to the initializing phase only, but can be issued at any time. © 2004 SanDisk Corporation 12/08/04...
  • Page 96: Clock Control

    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 97: Memory Array Partitioning

    The command is valid under the "not idle state". In SPI mode, CMD0 switching period is within 8 clocks after the end bit of the CMD0 command R1 response. 5.16 High-speed Mode (25MB/sec interface speed) Not available in SPI Mode. © 2004 SanDisk Corporation 12/08/04...
  • Page 98: Spi Command Set

    + + + Block write + + + Erase Write- + + + protect Lock card App- specific I/O mode 10 Switch + + + + Key: NS = Not supported in SPI mode. R = Reserved © 2004 SanDisk Corporation 12/08/04...
  • Page 99: Table

    None SEND_CSD Asks the selected card to send its card- specific data (CSD). CMD10 None SEND_CID Asks the selected card to send its card identification (CID). CMD11 CMD12 None STOP_TRANSMIS Forces the card to SION © 2004 SanDisk Corporation 12/08/04...
  • Page 100 The data transferred must not cross a physical block boundary unless READ_BLK_MISALIGN is set in the CSD Register. The data transferred must not cross a physical block boundary unless WRITE_BLK_MISALIGN is set in the CSD Register. © 2004 SanDisk Corporation 5-10 12/08/04...
  • Page 101 CMD52 Reserved for I/O mode (refer to SDIO Card Specification). … CMD54 CMD55 [31:0] stuff bits APP_CMD Notifies the card that the next command is an application-specific command rather than a standard command. © 2004 SanDisk Corporation 5-11 12/08/04...
  • Page 102: Responses

    Parameter error—The command’s argument (e.g., address, block length) was out of the allowed range for this card. RD/WR: 1 = host will get a block of data from the card. 0 = host sends block of data to the card. © 2004 SanDisk Corporation 5-12 12/08/04...
  • Page 103: Format R1B

    It is set when the host attempts to erase a write-protected sector or makes a sequence or password error during card lock/unlock operation. Card is locked—Set when the user locks the card. Resets when it is unlocked. © 2004 SanDisk Corporation 5-13 12/08/04...
  • Page 104: Data Tokens

    Data tokens are 4 to 515 bytes long and have the following format: Single-Block Read, Single-Block Write and Multiple-Block Read: First byte: Start Block. Bytes 2-513 (depends on the data block length): User Data. Last two bytes: 16-bit CRC. © 2004 SanDisk Corporation 5-14 12/08/04...
  • Page 105: Data Error Token

    X=Detected and set during command execution. The host must poll the card by issuing the status command in order to read these bits. Clear Condition: A=According to the card’s current state, C=Clear by read © 2004 SanDisk Corporation 5-15 12/08/04...
  • Page 106 Card is locked 0=not locked Card locked by a user 1=locked password Erase reset R1 R2 0=cleared Erase sequence was 1=set cleared before executing because an out-of-erase seqence command was © 2004 SanDisk Corporation 5-16 12/08/04...
  • Page 107: Card Registers

    (set to low) the CS signal. The card will resume busy signal (pulling DataOut low) one clock after the falling edge of CS. © 2004 SanDisk Corporation 5-17 12/08/04...
  • Page 108 X H H H read command H H H H H X X X X Data Out Z Z H H ********** H H H card response H H H data blk H H Z Z Z © 2004 SanDisk Corporation 5-18 12/08/04...
  • Page 109: Value Min

    The maximum read access time is calculated by the host as follows. (max)= 100 ((TAAC * f ) + (100 * NSAC)) ; is the interface clock rate and TAAC & NSAC are given in the CSD Register. © 2004 SanDisk Corporation 5-19 12/08/04...
  • Page 110: Spi Electrical Interface

    The SPI Mode electrical interface is identical to that of the SD Card mode. 5.26 SPI Bus Operating Conditions See SD Card mode. 5.27 Bus Timing See SD Card mode. The timing of the CS signal is the same as any other card input. © 2004 SanDisk Corporation 5-20 12/08/04...
  • 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.
  • Page 115: Appendix D Disclaimer Of Liability

    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 116: Appendix E Application Note

    Appendix D –Disclaimer of Liability Revision 2.2 SanDisk SD Card Product Manual Appendix E Application Note Host Design Considerations: NAND MMC and SD-based Products SanDisk Application Note for the SanDisk SD Card follows. © 2004 SanDisk Corporation 12/08/04...
  • 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.
  • Page 119: Timing Specifications

    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.
  • Page 120 The maximum burst rate achievable with the SD Card and MultiMediaCard depends on the clock speed and bus mode. The burst rate is the data transfer rate between the card’s buffer and host. © 2002 SanDisk Corporation 9/30/02, Lit# 80-11-00160...
  • Page 121 20 MHz 204.8 us MMC 1-bit mode 20 MHz 204.8 us SD Card SPI Bus mode 25 MHz 163.8 us SD 1-bit mode 25 MHz 163.8 us SD 4-bit mode 25 MHz 41 us © 2002 SanDisk Corporation 9/30/02, Lit# 80-11-00160...
  • Page 122: Power And Clock Control

    Card design. As mentioned in the Timing section, if the design needs to support the MultiMediaCard, the clock should be lowered to 400 kHz or less during initialization. When the initialization process is complete, the host can raise the clock speed to the card’s maximum. © 2002 SanDisk Corporation 9/30/02, Lit# 80-11-00160...
  • Page 123: Initialization Algorithm

    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.

Table of Contents