MultiMediaCard
TM
50
The SPI mode supports single and multiple block read operations (CMD17 and CMD18 in the
MultiMediaCard protocol). The main difference SPI and MultiMediaCard modes is that the data and the
response are both transmitted to the host on the DataOut signal. Therefore the card response to the
STOP_COMMAND may cut-short and replace the last data block (refer to Figure “Read Operation”).
Figure 4-4 Single Block Read Operation
Figure 4-5 Multiple Block Read Operation
The basic unit of data transfer is a block whose maximum size is defined in the CSD (READ_BL_LEN). A
16-bit CRC is appended to the end of each block ensuring data transfer integrity (also refer to chapter
“Cyclic Redundancy Check (CRC)”). CMD17 (READ_SINGLE_BLOCK) initiates a single block read.
CMD18 (READ_MULTIPLE_BLOCK) starts a transfer of several consecutive blocks. Two types of
multiple block read transactions are defined (the host can use either one at any time):
* Open-ended Multiple block read
The number of blocks for the read multiple block operation is not defined. The card willcontinuously
transfer data blocks until a stop transmission command is received.
* Multiple block read with pre-defined block count
The card will transfer the requested number of data blocks, terminate the transaction and return to
transfer state. Stop command is not required at the end of this type of multiple block read, unless
terminated with an error. In order to start a multiple block read with pre-defined block count, the host
must
use
the
SET_BLOCK_COUNT
command
READ_MULTIPLE_BLOCK (CMD18) command. Otherwise the card will start an open-ended multiple
block read which can be stopped using the STOP_TRANSMISSION command.
The host can abort reading at any time, within a multiple block operation, regardless of the its type.
Transaction abort is done by sending the stop transmission command.
In case of a data retrieval error, the card will not transmit any data. Instead, a special data error token will
be sent to the host. Figure “Read Operation-Data Error” shows a data read operation which terminated
(CMD23)
immediately
preceding
the