SanDisk SDSDH-1024 Product Manual - Page 98
SPI Command Set
UPC - 710348911073
View all SanDisk SDSDH-1024 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 98 highlights
Revision 2.2 Chapter 5 - SPI Protocol SD Card Product Manual 5.17 SPI Command Set The following sections provide valuable information on the SPI Command Set. 5.17.1 Command Format All SD Card commands are six bytes long and transmitted MSB first. Byte 1 76 5 0 0 1 Command Byte 2-5 31 0 Command Argument Byte 6 7 0 CRC 1 Commands and arguments are listed in Table 5-2. 7-bit CRC Calculation: G(x) = x7 + x3 + 1 M(x) = (start bit)*x39 + (host bit)*x38 +...+ (last bit before CRC)*x0 CRC[6...0] = Remainder[(M(x)*x7)/G(x)] 5.17.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. A 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 Memory 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 CCC 0 1 6 9 10 12 13 16 17 18 24 25 27 28 29 30 32 33 34 35 36 37 38 42 50 52 53 55 56 57 58 59 0 Basic ++ ++ ++ + + 1 NS 2 Block read +++ 3 NS 4 Block write + +++ 5 Erase ++ + 6 Writeprotect +++ 7 Lock card + + 8 App- + + specific 9 I/O mode + + 10 Switch + ++++ + + 11 R Key: NS = Not supported in SPI mode. R = Reserved © 2004 SanDisk Corporation 5-8 12/08/04