UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
289 of 362
NXP Semiconductors
UM10208
Chapter 23: LPC2800 SD/MMC
The command register contains the command index (six bits sent to a card) and the
command type. These determine whether the command requires a response, and
whether the response is 48 or 136 bits long (see
Table 23–335 “Command register
(MCICommand - 0x8010 000C)” on page 297
for more information). The command path
implements the status flags shown in
(see Status register, MCIStatus for
more information).
The CRC generator calculates the CRC checksum for all bits before the CRC code. This
includes the start bit, transmitter bit, command index, and command argument (or card
status). The CRC checksum is calculated for the first 120 bits of CID or CSD for the long
response format. Note that the start bit, transmitter bit and the six reserved bits are not
used in the CRC calculation.
The CRC checksum is a 7 bit value:
CRC[6:0] = Remainder (M(x)
×
x
7
) / G(x)
G(x) = x
7
+ x
3
+ 1
M(x) = (start bit)
×
x
39
+ ... + (last bit before CRC)
×
x
0
, or
M(x) = (start bit)
×
x
119
+ ... + (last bit before CRC)
×
x
0
Table 324. Simple response format
Bit Position
Width
Value
Description
0
1
1
End bit.
7:1
7
-
CRC7 (or 1111111).
39:8
32
-
Argument.
45:40
6
-
Command index.
46
1
0
Transmission bit.
47
1
0
Start bit.
Table 325. Long response format
Bit Position
Width
Value
Description
0
1
1
End bit.
127:1
127
-
CID or CSD (including internal CRC7).
133:128
6
111111
Reserved.
134
1
1
Transmission bit.
135
1
0
Start bit.
Table 326. Command path status flags
Flag
Description
CmdRespEnd
Set if response CRC is OK.
CmdCrcFail
Set if response CRC fails.
CmdSent
Set when command (that does not require response) is sent.
CmdTimeOut
Response timeout.
CmdActive
Command transfer in progress.