MultiMediaCard
TM
81
Sep.22.2005
Revision 0.3
7.4 SPI Bus Protocol
While the MultiMediaCard channel is based on command and data bit streams which are initiated by a start bit and termi-
nated 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, the SPI messages consist of command, response and data-block tokens. All com-
munication between host and card is controlled by the host (master). The host starts every bus transaction by asserting
the CS signal low.
The response behavior in the SPI mode differs from the MultiMediaCard mode in the following three aspects:
The selected card always responds to the command.
Additional (8, 16 & 40 bit) response structures are used
When the 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 read/write 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 write operations will be responded to with a spe-
cial data response token. A data block may be as big as one card write block and as small as a single byte. Partial block
read/write operations are enabled by card options specified in the CSD register.
7.5 Mode Selection
The MultiMediaCard wakes up in the MultiMediaCard mode. It 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 the MultiMediaCard mode is required (CS signal is high), it will not respond to the command
and remain in the MultiMediaCard mode. If SPI mode is required (CS signal is low), the card will switch to SPI and
respond with the SPI mode R1 response.
The only way to return to the MultiMediaCard mode is by a power cycle (turn the power off an on). In SPI mode, the Multi-
MediaCard protocol state machine is not observed. All the MultiMediaCard commands supported in SPI mode are always
available.
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.
EXT_CSD
Yes
512
Extended Card-specific data,
information about the card supported properties and configured modes
OCR
Yes
32
Operation condition register.
Table 7-2 : MultiMediaCard Registers In SPI Mode