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