10.07.2015 Views

SanDisk SD Card

SanDisk SD Card

SanDisk SD Card

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Revision 2.2Chapter 5 – SPI Protocol<strong>SD</strong> <strong>Card</strong> Product ManualFigure 5-6No Data OperationsFrom Hostto <strong>Card</strong>DataInCommandFrom <strong>Card</strong>to HostCommandFrom Hostto <strong>Card</strong>From <strong>Card</strong>to HostDataOutResponseResponseBusy5.7 Read CID/C<strong>SD</strong> RegistersUnlike the <strong>SD</strong> bus protocol (where the register contents are sent as a command response),reading the contents of the C<strong>SD</strong> and CID registers in SPI mode is a simple read-blocktransaction. The card will respond with a standard response token followed by a data blockof 16 bytes suffixed with a 16-bit CRC.The data time out for the C<strong>SD</strong> command cannot be set to the card TAAC since this value isstored in the C<strong>SD</strong>. Therefore, the standard response time-out value (N CR ) is used for readlatency of the C<strong>SD</strong> Register.5.8 Reset SequenceThe <strong>SD</strong> Memory <strong>Card</strong> requires a defined reset sequence. After power on reset or CMD0(software reset) the card enters an idle state. At this state the only valid host commands areACMD41 (<strong>SD</strong>_SEND_OP_COND), CMD58 (READ_OCR) and CMD59(CRC_ON_OFF). For the Thick (2.1mm) <strong>SD</strong> Memory <strong>Card</strong> - CMD1 (SEND_OP_COND)is also valid - that means that in SPI mode CMD1 and ACMD41 have the same behavior,though the usage of CMD41 is preferable because it allows easy distinguishing between<strong>SD</strong> Memory <strong>Card</strong> and MultiMedia<strong>Card</strong>. For the Thin (1.4mm) <strong>SD</strong> <strong>Card</strong> CMD1(SEND_OP_COND) is illegal command during the initialization that is done after poweron. After Power On, once the card accepted valid ACMD41, it will be able to accept alsoCMD1 even if used after re-initializing (CMD0) the card. It was defined in such way inorder to be able to distinguish between Thin <strong>SD</strong> Memory <strong>Card</strong> and MultiMedia<strong>Card</strong>s (thatsupports CMD1 as well).The host must poll the card (by repeatedly sending CMD1 or ACMD41) until the ‘in-idlestate’bit in the card response indicates (by being set to 0) that the card completed itsinitialization processes and is ready for the next command.In SPI mode, as opposed to <strong>SD</strong> mode, ACMD41 (or CMD1 as well, for 2.1mm-<strong>SD</strong> <strong>Card</strong>)has no operands and does not return the contents of the OCR register. Instead, the host mayuse CMD58 (available in SPI mode only) to read the OCR register. Furthermore, it is in theresponsibility of the host to refrain from accessing cards that do not support its voltagerange.The usage of CMD58 is not restricted to the initializing phase only, but can be issued at anytime.© 2004 <strong>SanDisk</strong> Corporation 5-5 12/08/04

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!