EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 214
Storage Ports
addressed by the Function Number and Register Address. If the RAW flag is 0, then the data in the register that was
written will be read and that value returned in the response.
â– RAW flag: The Read after Write flag. If this bit is set to 1 and the R/W flag is set to 1, then the command will read the value
of the register after the write. This is useful to allow writing to a control register and reading the status at the same
address. If this bit is cleared, the value returned in the R5 response will be the same as the write data in the command. If
this bit is set, the data field of the R5 response will contain the value read from the addressed register after the write
operation.
â– Function Number: The number of the function within the I/O card you wish to read or write. Note that function 0 selects the
CIA.
â– Register Address: This is the address of the byte of data inside the selected function to read or write. There are 17 bits of
address available, so the register is located within the first 128K (131,072) addresses of that function.
â– Write Data or Stuff Bits: For a direct write command (R/W=1), this is the byte that is written to the selected address. For a
direct read command (R/W=0), this field is not used and is be set to 0.
â– CRC7: Seven bits of CRC data.
â– E: End bit, always 1.
9.5.3.3.1 CMD52 R5 Response (SD Mode)
If the communication between the card and host is in the 1-bit or 4-bit SD mode, the response will be in a 48-bit response
(R5) as shown in Figure 9-8.
Figure 9-8. R5 IO_RW_DIRECT Response (SD Modes)
*
* Source: SDIO Specification, version 2.0
â– S: Start bit. Always 0.
â– D: Direction. 0 indicates transfer card to host (response).
â– Command Index: Identifies the IO_RW_DIRECT command with a value of 110100b.
â– Stuff: Not used. Will be set to 0.
â– Response Flags Bit: Eight bits of flag data indicating the status of the SDIO card.
â– Read or Write Data: For an I/O write (R/W=1) with the RAW flag set (RAW=1), this field will 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 will not do a read after the write operation, and the data in this field will 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: Seven bits of CRC data.
â– E: End bit, always 1.
For more details on the command response format and bit descriptions, refer to the SDIO specification.
9.5.3.3.2 CyU3PSdioByteReadWrite API
CMD52 command transmission is initiated in the same manner as explained in 9.5.1.5 Sending SD/MMC/SDIO
Commands on page 206. The 1-byte response data of the CMD52 read register command is contained in the lower 8 bits of
the SDMMC_RESP_REG register.
SD
Command
Index
110100b
Stuff
Response Flag
Bits
7-----------0
Read or Write
Data
CRC7 E
11 6 16 8 8 7 1