Memory Card Specification Sheet

©Copyright 2000-2007 SD Card Association
SDIO Simplified Specification Version 2.00
22
5.2 IO_RW_DIRECT Response (R5)
The SDIO card’s response to CMD52 shall be in one of two formats. If the communication between the card and
host is in the 1-bit or 4-bit SD mode, the response shall be in a 48-bit response (R5) as described in 5.2.1. If the
communication is using the SPI mode, the response shall be a 16-bit R5 response as described in 5.2.2.
5.2.1 CMD52 Response (SD modes)
The SDIO card’s response to CMD52 in the SD mode is shown in Figure 5-2. If the operation was a read
command, the data being read is returned as an 8-bit value. In addition, 15 bits of status information is returned.
The format of the SD response is as follows:
S D
Command
Index
110100b
Stuff Response Flags
Bit
7--------------------------0
Read or Write
Data
CRC7 E
1 1 6 16 8 8 7 1
Figure 5-2 R5 IO_RW_DIRECT Response (SD modes)
The IO_RW_DIRECT response (R5) contains the following fields:
S(tart bit): Start bit. Always 0
D(irection): Direction. 0 indicates transfer card to host (Response)
Command Index: Identifies the “IO_RW_DIRECT” command with a value of 110100b
Stuff Bits Not used, shall be set to 0
Response Flags 8 Bits of flag data indicating the status of the SDIO card. Table 5-1 shows the format
of these flag bits.
Read or Write Data: For an I/O write (R/W=1) with the RAW Flag set (RAW=1) this field shall contain the
value read from the addressed register after
the write of the data contained in the
command. Note that in this case, the read-back data may not be the same as the
data written to the register, depending on the design of the hardware. For an I/O
write with the RAW bit=0, the SDIO function shall not
do a read after write operation,
and the data in this field shall be identical to the data byte in the write command. For
an I/O read (R/W=0), the actual value read from that I/O location is returned in this
field.
CRC7: 7 bits of CRC data
E(nd bit): End bit, always 1
Bits Identifier Type Value Description Clear
Condition
7 COM_CRC_ERROR E R ’0’= no error
’1’= error
The CRC check of the previous
command failed.
B
6 ILLEGAL_COMMAND E R ’0’= no error
’1’= error
Command not legal for the card
State.
B