MultiMediaCard
TM
84
Sep.22.2005
Revision 0.3
If the host uses partial blocks whose accumulated length is not block aligned, and block misalignment is not allowed, the
card shall detect a block misalignment error condition during the transmission of the first misaligned block and the content
of the further transferred bits is undefined. As the host sends CMD12, the card will respond with the
ADDRESS_MISALIGN bit set.
7.8 Data Write
The SPI mode supports single block and Multiple block write commands. Upon reception of a valid write command
(CMD24 or CMD25), the card will respond with a response token and will wait for a data block to be sent from the host.
CRC suffix, block length and start address restrictions are (with the exception of the CSD parameter WRITE_BL_PARTIAL
controlling the partial block write option) identical to the read operation (see Figure 7-5). If a CRC error is detected it will be
reported in the data-response token and the data block will not be programmed.
Figure 7-5 : SPI Single Block Write Operation
Every data block has a prefix of ‘Start Block’ token (one byte).
After a data block has been received, the card will respond with a data-response token. If the data block has been
received without errors, it will be programmed. As long as the card is busy programming, a continuous stream of busy
tokens will be sent to the host (effectively holding the DataOut line low).
In Multiple Block write operation the stop transmission will be done by sending ‘Stop Tran’ token instead of ‘Start Block’
token at the beginning of the next block.
Figure 7-6 : SPI Multiple Block Write Operation
Two types of multiple block write transactions, identical to the multiple block read, are defined (the host can use either one
at any time):
Open-ended Multiple block write
The number of blocks for the write multiple block operation is not defined. The card will continuously accept and program
data blocks until a ‘Stop Tran’ token is received.
data_response
command
DataIn
DataOut
from
host
to card
new command
from host
data from
host
to card
from
card
to host
data block
busy
Data
response and busy
from
card
to host
response
Start
Block
Token
command
data
command
DataIn
DataOut
from
host
to card
data from
host
to card
from
card
to host
data
block
busy
Data
response and
busy from
card
response
Start
Block
Token
Stop
Tran
Token
to card
busy
response
data from
host
to card
data
block
data
busy
response