Data Write - SanDisk SDSDB-32-201-80 - Industrial Grade Flash Memory Card Product Manual

Secure digital card
Table of Contents

Advertisement

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).
From host
to card(s)
DataIn
Command
DataOut

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.
From host
to card
DataIn
Command
DataOut
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.
SanDisk Secure Digital (SD) Card Product Manual, Rev. 1.9 © 2003 SANDISK CORPORATION
Figure 5-2. Read Operation—Data Error
From card
to host
Data from
card to host
Response
Data Block
Figure 5-3. Multiple Block Read Operation
Start block
From card
token
to host
Data Block
Response
Figure 5-4. Single Block Write Operation
Command
Data Block
CRC
CRC
Data
response
Data from
and busy
host to
from card
card
Response
Busy
SPI Protocol Definition
Stop
Transmission
command
From card
to host
Response
New
command
from host
Command
5-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents