Product manual
SPI Protocol Definition
5-8 SanDisk Industrial Grade SD Product Manual, Rev. 1.0 © 2003 SANDISK CORPORATION
Commands and arguments are listed in Table 5-2.
7-bit CRC Calculation: G(x) = x
7 +
x
3 +
1
M(x) = (start bit)∗x
39
+ (host bit)∗x
38
+...+ (last bit before CRC)∗x
0
CRC[6...0] = Remainder[(M(x)∗x
7
)/G(x)]
5.2.2. Command Classes
As in SD mode, the SPI commands are divided into several classes (See Table 5-1). Each class supports a set of
card functions. An Industrial Grade SD Card will support the same set of optional command classes in both
communication modes (there is only one command class table in the CSD register). The available command classes,
and the supported commands for a specific class, however, are different in the SD Card and the SPI communication
mode.
Note that except the classes that are not supported in SPI mode (class 1, 3 and 9), the mandatory required classes for
the SD mode are the same for the SPI mode.
Table 5-1. Command Classes in SPI Mode
Card CMD Class
(CCC)
Class Description Supported Commands
0 1 9 10 12 13 16 17 18 24 25 27 28 29 30 32 33 38 42 55 56 58 59
class 0 Basic + + + + + + + +
class 1 Not supported in SPI
class 2 Block read + + +
class 3 Not supported in SPI
class 4 Block write + + +
class 5 Erase + + +
class 6 Write-protection (Optional) + + +
class 7 Lock Card (Optional)* +
class 8 Application specific + +
class 9 Not supported in SPI
class 10-11 Reserved
* The Lock Card command is supported in the Industrial Grade SD Card.
5.2.2.1. Detailed Command Description
The following table provides a detailed description of the SPI bus commands. The responses are defined in Section
5.2.3. Table 5-2 lists all Industrial Grade SD Card commands. A “yes” in the SPI mode column indicates that the
command is supported in SPI mode. With these restrictions, the command class description in the CSD is still valid.
If a command does not require an argument, the value of this field should be set to zero. The reserved commands
are reserved in SD Card mode as well.
The binary code of a command is defined by the mnemonic symbol. As an example, the content of the Command
field for CMD0 is (binary) ‘000000’ and for CMD39 is (binary) ‘100111.’