SPI Bus Protocol Mode Selection

Revision 1.0 MultiMediaCardRS-MultiMediaCard Product Manual © 2004 SanDisk Corporation 5-3 051304

5.3 Card Registers in SPI Mode

The register usage in SPI mode is summarized in Table 5-2. Most of them are inaccessible. Table 5-2 MultiMediaCardRS-MultiMediaCard Registers in SPI Mode Name Available in SPI mode Width [Bytes] Description CID Yes 16 Card identification data serial number, manufacturer ID, etc.. RCA No DSR No CSD Yes 16 Card-specific data, information about the card operation conditions. OCR Yes 32 Operation condition register.

5.4 SPI Bus Protocol

While the MultiMediaCard channel is based on command and data bit streams, which are 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 8-bit bytes and is byte aligned to the CS signal i.e., the length is a multiple of 8 clock cycles. Similar to the MultiMediaCard Protocol, SPI messages consist of command, response and data-block tokens. The host master controls all communication between the host and cards. The host starts every bus transaction by asserting the CS signal low. The response behavior in SPI mode differs from MultiMediaCard mode in the following three aspects: · Selected card always responds to the command. · Additional 8, 16 and 40 bit response structures are used. · Card encounters a data retrieval problem, it will respond with an error response which replaces the expected data block rather than by a time-out, as in the MultiMediaCard mode. Only single and multiple block readwrite operations are supported in SPI mode sequential mode is not supported. In addition to the command response, every data block sent to the card during a write operation will be responded to with a special data response token. A data block may be as big as one card sector and as small as a single byte. Partial block readwrite operations are enabled by card options specified in the CSD register.

5.5 Mode Selection

The MultiMediaCard and RS_MultiMediaCard “wake up” in the MultiMediaCard mode. The card will enter SPI mode if the CS signal is asserted negative during the reception of the reset command CMD0. Selecting SPI mode is not restricted to Idle state the state the card enters after power up only. Every time the card receives CMD0, including while in Inactive state, CS signal is sampled. If the card recognizes that MultiMediaCard mode is required CS signal is high, it will not respond to the command and remain in MultiMediaCard mode. If SPI mode is required Revision 1.0 MultiMediaCardRS-MultiMediaCard Product Manual © 2004 SanDisk Corporation 5-4 051304 CS signal low, the module will switch to SPI mode and respond with the SPI mode R1 response. The only way to return to MultiMediaCard mode is by a power cycle turning the power off and on. In SPI mode, the MultiMediaCard protocol state machine is not observed. All of the MultiMediaCard commands supported in SPI mode are always available.

5.6 Bus Transfer Protection