Product manual

SPI Protocol Definition
SanDisk Industrial Grade SD Product Manual, Rev. 1.0 © 2003 SANDISK CORPORATION -5-9
Table 5-2. Description of SPI Bus Commands
CMD
INDEX
SPI
Mode
Argument Resp Abbreviation Command Description
CMD0 Yes None R1 GO_IDLE_STATE Resets the SD Card
CMD1 Yes None R1 SEND_OP_COND Activates the card’s initialization process.
CMD2 No
CMD3 No
CMD4 No
CMD5 Reserved
CMD6 Reserved
CMD7 No
CMD8 Reserved
CMD9 Yes None R1 SEND_CSD Asks the selected card to send its card-specific
data (CSD).
CMD10 Yes None R1 SEND_CID Asks the selected card to send its card
identification (CID).
CMD11 No
CMD12 Yes None R1b STOP
_TRANSMISSION
Forces the card to stop transmission during a
multiple block read operation.
CMD13 Yes None R2 SEND_STATUS Asks the selected card to send its status register.
CMD14 No
CMD15 No
CMD16 Yes [31:0] block length R1 SET_BLOCKLEN Selects a block length (in bytes) for all following
block commands (read & write).
1
CMD17 Yes [31:0] data address R1 READ_SINGLE
_BLOCK
Reads a block of the size selected by the
SET_BLOCKLEN command.
2
CMD18 Yes [31:0] data address R1 READ_MULTIPLE
_BLOCK
Continuously transfers data blocks from card to
host until interrupted by a STOP_
TRANSMISSION command.
CMD19 Reserved
CMD20 No
CMD21
...
CMD23
Reserved
CMD24 Yes [31:0] data address R1
3
WRITE_BLOCK Writes a block of the size selected by the
SET_BLOCKLEN command.
4
CMD25 Yes [31:0] data address R1 WRITE_MULTIPLE_BLOCK Continuously writes blocks of data until a stop
transmission token is sent (instead of ‘start block’).
1) The only valid block length for write is 512 bytes. The valid block length for read is 1 to 512 bytes. A set block
length of less than 512 bytes will cause a write error. The card has a default block length of 512 bytes. CMD16 is
not mandatory if the default is accepted.
2) The start address and block length must be set so that the data transferred will not cross a physical block
boundary.
3) Data followed by data response plus busy.
4) The start address must be aligned on a sector boundary. The block length is always 512 bytes.