Chapter 5 – SPI Protocol
Revision 2.2
SD Card Product Manual
© 2004 SanDisk Corporation
5-12
12/08/04
CMD
Index
SPI
Mode
Argument Resp
Abbreviation Description
CMD56
Yes
[31:0] stuff bits, [0]:
RD/WR
4
R1
GEN_CMD
Used either to transfer
a Data Block to the
card or to get a Data
Block from the card
for general
purpose/application
specific commands.
The size of the Data
Block is defined with
SET_BLOCK_LEN
command.
CMD57
Reserved for each command system set by switch function command (CMD6). Detailed
definition can be referenced in each command system specification.
CMD58
Yes
None
R3
READ_OCR
Reads the OCR
Register of a card.
CMD59
Yes
[31:1] stuff bits, [0:0]
CRC option
R1
CRC_ON_OFF
Turns the CRC option
on or off. A ‘1’ in the
CRC option bit will
turn the option on, a
‘0’ will turn it off.
CMD60-
CMD63
Reserved for manufacturer.
5.18 Responses
There are several types of response tokens. As in the SD mode, all are transmitted MSB
first.
5.18.1 Format
R1
The card sends this response token after every command with the exception of
SEND_STATUS commands. It is 1-byte long, the MSB is always set to zero and the other
bits are error indications; ‘1’ signals error.
•
Idle state—The card is in idle state and running initializing process.
•
Erase reset—An erase sequence was cleared before executing because an out of erase
sequence command was received.
•
Illegal command—An illegal command code was detected.
•
Communication CRC error—The CRC check of the last command failed.
•
Erase sequence error—An error in the sequence of erase commands occurred.
•
Address error—A misaligned address, which did not match the block length was used
in the command.
•
Parameter error—The command’s argument (e.g., address, block length) was out of the
allowed range for this card.
4
RD/WR: 1 = host will get a block of data from the card. 0 = host sends block of data to the card.