EasyManuals Logo

Cypress EZ-USB FX3 User Manual

Cypress EZ-USB FX3
660 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #216 background imageLoading...
Page #216 background image
EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 216
Storage Ports
The IO_RW_EXTENDED command contains the following fields:
â–  S: Start bit. Always 0.
â–  D: Direction. Always1 indicates transfer host to card.
â–  Command Index: Identifies the IO_RW_EXTENDED command with a value of 110101b.
â–  R/W flag: This bit determines the direction of the I/O operation. If this bit is 0, this command reads data from the SDIO
card at the address specified by the Function Number and the Register Address to the host; otherwise, it writes the bytes
from the DAT[x] lines to the I/O location addressed by the Function Number and Register Address.
â–  Function Number: The number of the function within the I/O card you wish to read or write. Note that function 0x00 selects
the CIA.
â–  Block Mode (optional): If set to 1, this bit indicates that the read or write operation will be performed on a block basis,
rather than the normal byte basis. If this bit is set, the Byte/Block Count value contains the number of bytes/blocks to be
read/written. The block size for functions 1-7 is set by writing the block size to the I/O block size register in the FBR. The
block size for function 0 is set by writing to the FN0 block size register in the CCCR. Card and host support for the block I/
O mode is optional. The block size used when Block Mode = 1 and the maximum byte count per command used when
Block Mode = 0 can be read from the CIS in the tuple TPLFE_MAX_BLK_SIZE on a per-function basis (refer to the SDIO
specification for more details). Tab le 9 - 3 shows the relationship between the value in the command and the actual number
of bytes/blocks transferred.
â–  OP code: Defines the read/write operation as described in Table 9-2.
Table 9-2. OpCode Field Description
â–  Register Address: Start Address of the I/O register to read or write. Range is [0x1FFFF:0].
â–  Byte/ Block Count: If the command is operating on bytes (Block Mode = 0), this field contains the number of bytes to read
or write. A value of 0x000 shall cause 512 bytes to be read or written. If the command is in block mode (Block Mode=1),
the Block Count field specifies the number of Data Blocks to be transferred following this command. A value of 0x000
indicates that the count set to infinite.
Table 9-3. Byte Count Values
â–  CRC7: Seven bits of CRC data.
â–  E: End bit, always 1.
9.5.3.3.4 CyU3PSdioExtendedReadWrite API
The CyU3PSdioExtendedReadWrite API performs extended I/O operations (multibyte/multiblock) to/from the SDIO card
using CMD53. Arguments needed for CMD53 described in 9.5.3.3.3 IO_RW_EXTENDED Command (CMD53) are passed as
parameters.
Inside this API, the block length and number of blocks, calculated from the parameters passed to it, are set in the appropriate
registers: SDMMC_BLOCKLEN and SDMMC_BLOCK_COUNT. The logic for the same is as follows.
if (blockmode == CY_U3P_SDIO_RW_BLOCK_MODE)
{
noOfBlocks = transferCount;
Op Code Command Operation Description
0 Multibyte R/W to fixed address
Used to read or write multiple bytes of data to/from a single I/O register address. This command is useful
when I/O data is transferred using a FIFO inside the I/O card.
1 Multibyte R/W to incremental address
Used to read or write multiple bytes of data to/from an I/O register address that increments by 1 after each
operation. This command is used when large amounts of I/O data exist within the I/O card in a RAM-like
data buffer.
Count Value 0x000 0x001 0x002 ----- 0x1FF
Bytes Transferred 512 1 2 ----- 511
Blocks Transferred ∞ 1 2 ----- 511

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cypress EZ-USB FX3 and is the answer not in the manual?

Cypress EZ-USB FX3 Specifications

General IconGeneral
BrandCypress
ModelEZ-USB FX3
CategoryController
LanguageEnglish

Related product manuals