SPI Protocol Definition
SanDisk Secure Digital (SD) Card Product Manual, Rev. 1.9 © 2003 SANDISK CORPORATION
5-3
Figure 5-2. Read Operation—Data Error
In the case of a Multiple Block Read operation, every transferred block has a 16-bit CRC suffix. The Stop
Transmission command (CMD12) will actually stop the data transfer operation (the same as in SD Bus mode).
Figure 5-3. Multiple Block Read Operation
5.1.4. Data Write
In SPI mode, the SD Card supports single block or multiple block write operations. Upon reception of a valid write
command (SD Card 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 and start address restrictions are identical to the read operation (see
Figure 5-4). The only valid block length, however, is 512 bytes. Setting a smaller block length will cause a write
error on the next write command.
Figure 5-4. Single Block Write Operation
Every data block has a prefix or ‘start block’ token (one byte). After a data block is received the card will respond
with a data-response token, and if the data block is received with no 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).
Once the programming operation is completed, the host must check the results of the programming using the
SEND_STATUS command (CMD13). Some errors (e.g., address out of range, write protect violation, etc.) are
detected during programming only. The only validation check performed on the data block and communicated to
the host via the data-response token is CRC and general Write Error indication.
Command
DataIn
From host
to card(s)
DataOut
Command
From card
to host
From card
to host
Data Block
CRC
Response
Data Block
CRC
Response
Stop
Transmission
command
Data from
card to host
Command
DataIn
From host
to card
Data from
host to
card
DataOut
Data Block
Response
Busy
New
command
from host
From card
to host
Command
Response
Start block
token
Data
response
and busy
from card