SanDisk SDSDH-1024 Product Manual - Page 72

Cyclic Redundancy Codes

Page 72 highlights

Revision 2.2 Chapter 4 - SD Card Protocol Description SanDisk SD Card Product Manual • The clock must be running for the card to output data or response tokens. After the last bus transaction, the host is required, to provide eight clock cycles for the card to complete the operation before shutting down the clock. Following is a list of various card bus transactions: − A command with no response-eight clocks after the host command end bit. − A command with response-eight clocks after the card response end bit. − A read data transaction-eight clocks after the end bit of the last data block. − A write data transaction-eight clocks after the CRC status token. • The host is allowed to shut down the clock of a card that is busy; the card will complete the programming operation regardless of the host clock. However, the host must provide a clock edge for the card to turn off its busy signal. Without a clock edge the card (unless previously disconnected by a de-select command -CMD7) will permanently force the DAT line down. 4.6 Cyclic Redundancy Codes The Cyclic Redundancy Check (CRC) is intended to protect SD Card commands, responses, and data transfers against transmission errors, on its bus. One CRC is generated for every command and checked for every response on the CMD line. For data blocks, CRCs are generated for each DAT line per transferred block. The CRC is generated and checked as shown in the following subsections. 4.6.1 CRC7 The CRC7 check is used for all commands, all responses except type R3, and CSD and CID registers. The CRC7 is a 7-bit value and is computed as follows: generator polynomial: G(x) = x7 + x3 + 1 M(x) = (first bit) * xn + (second bit) * xn-1 +...+ (last bit) * x0 CRC[6...0] = Remainder [(M(x) * x7) / G(x)] Figure 4-13 CRC7 Generator/Checker © 2004 SanDisk Corporation 4-28 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-28
12/08/04
The clock must be running for the card to output data or response tokens. After the last
bus transaction, the host is required, to provide eight clock cycles for the card to
complete the operation before shutting down the clock. Following is a list of various
card bus transactions:
A command with no response—eight clocks after the host command end bit.
A command with response—eight clocks after the card response end bit.
A read data transaction—eight clocks after the end bit of the last data block.
A write data transaction—eight clocks after the CRC status token.
The host is allowed to shut down the clock of a card that is busy; the card will
complete the programming operation regardless of the host clock. However, the host
must provide a clock edge for the card to turn off its busy signal. Without a clock edge
the card (unless previously disconnected by a de-select command -CMD7) will
permanently force the DAT line down.
4.6
Cyclic Redundancy Codes
The Cyclic Redundancy Check (CRC) is intended to protect SD Card commands,
responses, and data transfers against transmission errors, on its bus. One CRC is generated
for every command and checked for every response on the CMD line. For data blocks,
CRCs are generated for each DAT line per transferred block. The CRC is generated and
checked as shown in the following subsections.
4.6.1
CRC7
The CRC7 check is used for all commands, all responses except type R3, and CSD and
CID registers. The CRC7 is a 7-bit value and is computed as follows:
generator polynomial: G(x) = x
7
+ x
3
+ 1
M(x) = (first bit) * x
n
+ (second bit) * x
n-1
+...+ (last bit) * x
0
CRC[6...0] = Remainder [(M(x) * x
7
) / G(x)]
Figure 4-13
CRC7 Generator/Checker