EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 213
Storage Ports
else
{
CyU3PDmaChannelReset ((CyU3PDmaChannel *) &glChHandleMscIn);
}
/* Make sure the request is aborted and that the controller is reset. */
CyU3PSibAbortRequest (portId);
}
}
9.5.3 Working with SDIO Cards
9.5.3.1 Configuration and Initialization
The configuration of the S-port and the initialization are very similar to that of the SD card, as explained in 9.5.1 S-port
Initialization and Configuration on page 204.
The IOMatrix configuration is done similarly to that for SD cards and interface parameters are set independently for the
appropriate S-port. The CyU3PSibStart API calls for starting the storage driver also identify and initialize the SDIO device
connected on the two storage ports. The device type, "SDIO IO only" or "combo card," can be learned by calling
CyU3PSibQueryDevice.
Note: The storage driver and library APIs in FX3 SDK 1.3.1 have been tested for SDIO I/O only cards. For combo cards,
contact Cypress Support.
CyU3PSdioQueryCard can be used to fetch SDIO card information and card common register information. This function
returns a CYU3PSdioCardRegs object that contains card common register information from an initialized SDIO card on the
port specified by portId.
9.5.3.2 Reads and Writes from SDIO Card Registers
9.5.3.3 IO_RW_DIRECT Command (CMD52)
The IO_RW_DIRECT command (CMD52) is the simplest means to access a single register within the total register space in
any I/O function, including the common I/O area (CIA). This command reads or writes 1 byte using only 1 command/response
pair. A common use is to initialize registers or monitor status values for I/O functions. This command is the fastest means to
read or write single I/O registers, as it requires only a single command/response pair.
Figure 9-7. IO_RW_DIRECT Command
*
* Source: SDIO Specification, version 2.0
The IO_RW_DIRECT command contains the following fields:
â– S: Start bit. Always 0.
â– D: Direction. Always1; indicates transfer host to card.
â– Command Index: Identifies the IO_RW_DIRECT command with a value of 110100b.
â– R/W flag: This bit determines the direction of the I/O operation. If this bit is 0, this command will read data from the SDIO
card at the address specified by the Function Number and the Register Address to the host. The data byte is returned in
the response, R5. If this bit is set to 1, the command will write the bytes in the Write Data field to the I/O location
SD
Command
Index
110100b
R/W
Flag
Function
Number
RAW
Flag
Stuff
Register
Address
Stuff
Write Data or
Stuff Bits
CRC7 E
11 6 1 3 1 1 17 1 8 7 1