SPI Protocol Definition
SanDisk Secure Digital (SD) Card Product Manual, Rev. 1.9 © 2003 SANDISK CORPORATION
5-11
CMD
INDEX
SPI
Mode
Argument Resp
Abbreviation
Command
Description
CMD26 No
CMD27 Yes
None
R1 PROGRAM_CSD Programming
of the programmable bits of the CSD.
CMD28
1
Yes
[31:0] data address
R1b
SET_WRITE_PROT
If the card has write protection features, this
command sets the write protection bit of the
addressed group. The properties of write protection
are coded in the card specific data
(WP_GRP_SIZE).
CMD29
4
Yes
[31:0] data address
R1b
CLR_WRITE_PROT
If the card has write protection features, this
command clears the write protection bit of the
addressed group.
CMD30
Yes
[31:0] write protect
data address
R1 SEND_WRITE_
PROT
If the card has write protection features, this
command asks the card to send the status of the
write protection bits.
2
CMD31
Reserved
CMD32
Yes
[31:0] data address
R1
ERASE_WR_BLK_START
_ADDR
Sets the address of the first write block to be
erased.
CMD33
Yes
[31:0] data address
R1
ERASE_WR_BLK_END
_ADDR
Sets the address of the last write block in a
continuous range to be erased.
CMD34
….
CMD37
Reserved
CMD38
Yes
[31:0] don’t care*
R1b
ERASE
Erases all previously selected write blocks.
CMD39 No
CMD40 No
CMD41 ...
CMD54
Reserved
CMD55
Yes
[31:0] stuff bits
R1
APP_CMD
Notifies the card that the next command is an
application specific command rather than a
standard command.
CMD56
Yes
[31:0] stuff bits
[0]: RD/WR.
3
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
CMD58 Yes
None
R3
READ_OCR
Reads
the OCR register of a card.
CMD59
Yes
[31:1] don’t care*
[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-63 No
* The bit places must be filled but the values are irrelevant.
1) These features are not currently supported in the SanDisk SD Card.
2) 32 write protection bits (representing 32 write protect groups starting at the specified address) followed by 16
CRC bits are transferred in a payload format via the data line.
3) RD/WR_: “1”=the host will get a block of data from the card. “0”=the host sends a block of data to the card.