SanDisk SDSDH-1024 Product Manual - Page 75

Command Format, Command Classes

Page 75 highlights

Revision 2.2 Chapter 4 - SD Card Protocol Description SanDisk SD Card Product Manual 4.8.2 Command Format The command length shown in Figure 4-15 is 48 bits. Figure 4-15 Format (1.92 µs @ 25 MHz) 0 1 bit 5....bit 0 bit 31....bit 0 bit 6....bit 0 start bit host command argument CRC7 Commands and arguments are listed in Table 4-13. 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)] 1 end bit 4.8.3 Command Classes The command set of the SD Card is divided into several classes (refer to Table 4-15). Each class supports a set of card functions. The supported Card Command Classes (CCC) is coded as a parameter in the CSD Register data of each card, providing the host with information on how to access the card. Table 4-15 Card Command Classes Class CMD CMD0 CMD2 CMD3 CMD4 CMD5 CMD620 CMD7 CMD9 CMD10 CMD12 CMD13 CMD15 CMD16 CMD17 CMD18 CMD24 CMD25 CMD27 0 Basic 1 2 R Block Read 34 R Block Write + + + + 5 Erase 6 Write Protec tion 7 8 Lock AppCard Specific 9 I/O Mode + + + + + + + + + + + + + + + 10 11 Switch R + 20 This command is newly defined in SD Card Physical Description Spec. v1.10 © 2004 SanDisk Corporation 4-31 12/08/04

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123

Chapter 4 – SD Card Protocol Description
Revision 2.2
SanDisk SD Card Product Manual
© 2004 SanDisk Corporation
4-31
12/08/04
4.8.2
Command Format
The command length shown in Figure 4-15 is 48 bits.
Figure 4-15
Format (1.92 μs @ 25 MHz)
0
1
bit 5….bit 0
bit 31….bit 0
bit 6….bit 0
1
start bit
host
command
argument
CRC7
end bit
Commands and arguments are listed in Table 4-13.
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)]
4.8.3
Command Classes
The command set of the SD Card is divided into several classes (refer to Table 4-15). Each
class supports a set of card functions.
The supported Card Command Classes (CCC) is coded as a parameter in the CSD Register
data of each card, providing the host with information on how to access the card.
Table 4-15
Card Command Classes
Class
0
1
2
3
4
5
6
7
8
9
10
11
CMD
Basic
R
Block
Read
R
Block
Write
Erase
Write
Protec
tion
Lock
Card
App-
Specific
I/O
Mode
Switch
R
CMD0
+
CMD2
+
CMD3
+
CMD4
+
CMD5
+
CMD6
20
+
CMD7
+
CMD9
+
CMD10
+
CMD12
+
CMD13
+
CMD15
+
CMD16
+
+
+
CMD17
+
CMD18
+
CMD24
+
CMD25
+
CMD27
+
20
This command is newly defined in SD Card Physical Description Spec. v1.10