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 Manual5.3 Bus Transfer ProtectionCRC bits protect every <strong>SD</strong> <strong>Card</strong> token transferred on the bus. In SPI mode, the <strong>SD</strong> <strong>Card</strong>offers a non protected mode which enables systems built with reliable data links to excludethe hardware or firmware required for implementing the CRC generation and verificationfunctions.In the non-protected mode the CRC bits of the command, response and data tokens are stillrequired in the tokens however, they are defined as “don’t care” for the transmitters andignored by the receivers.The SPI interface is initialized in the non-protected mode. The host can turn this option onand off using CRC_ON_OFF command (CMD59).The CRC7/CRC16 polynomials are identical to that used in <strong>SD</strong> Bus mode. Refer to thissection in the <strong>SD</strong> Bus mode chapter.5.4 Data ReadSPI mode supports single block and multiple-block read operations (<strong>SD</strong> <strong>Card</strong> CMD17 orCMD18). Upon reception of a valid read command the card will respond with a responsetoken followed by a data token in the length defined in a previous SET_BLOCK_LENGTH(CMD16) command (see Figure 5-1).Figure 5-1 Single Block Read OperationFrom Hostto <strong>Card</strong>DataInCommandFrom <strong>Card</strong>to HostNext CommandData from<strong>Card</strong> to HostCommandDataOutResponse Data Block CRCA valid data block is suffixed with a 16-bit CRC generated by the standard CCITTpolynomial: x 16 +x12+x 5 +1.The maximum block length is 512 bytes as defined by READ_BL_LEN (C<strong>SD</strong> parameter).Block lengths can be any number between 1 and READ_BL_LEN.The start address can be any byte address in the valid address range of the card. Everyblock, however, must be contained in a single physical card sector.In case of data retrieval error, the card will not transmit any data. Instead, a special dataerror token will be sent to the host. Figure 5-2 shows a data read operation, whichterminated with an error token rather than a data block.© 2004 <strong>SanDisk</strong> Corporation 5-2 12/08/04

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

Saved successfully!

Ooh no, something went wrong!