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 #207 background imageLoading...
Page #207 background image
EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 207
Storage Ports
After writing to these registers, the command transmission is initiated by setting the SDMMC_CS. SNDCMD bit and then
polled for the SDMMC_INTR.CMDSENT bit that indicates command send completion. Refer to 9.5.1.6 Handling SIB
Events on page 208 for the SDMMC_INTR register field descriptions.
The SDMMC_INTR.RCVDRES bit is polled to get the response from the card. The first 8 bits of response are captured in the
RESP_IDX register. These eight bits include the start, transmission, and command index fields. The response data received
from the card on the response bus, including crc7 and end bits, is placed in registers SDMMC_RESP_REG.
For bit definitions, refer to SDMMC_RESP_IDX register on page 635 and SDMMC_RESP_REG0 register on page 636.
Command/response timing is specified through the registers, SDMMC_NCC_NWR, SDMMC_NAC, and SDMMC_NCR.
For bit definitions, refer to SDMMC_NCC_NWR register on page 656, SDMMC_NAC register on page 657, SDMMC_NCR
register on page 655.
A block size of 512 (0x0200) is set as the default using the register SDMMC_BLOCKLEN.
Following successful initialization, the SIB mode (SD/ MMC/ SDIO) is set and SIB is configured for the data bus width and
clock speed using the SDMMC_MODE_CFG register. For bit definitions, refer to SDMMC_MODE_CFG register on page 644.
The devices detected on the storage ports can be queried using the API CyU3PSibQueryDevice. If the device on the storage
port has more than one partition, then the API CyU3PSibQueryUnit can be used to access the storage partition (LUN)
information for the specified port and unit number. This applies only to SD and eMMC devices.
for (i = 0; i < CY_FX_SIB_PORTS; i++)
{
unitsFound = 0;
/* Initialize LUN data structures with default values. */
for (j = 0; j < CY_FX_SIB_PARTITIONS; j++)
{
glLunState[i * CY_FX_SIB_PARTITIONS + j] = CyFalse;
glLunUnit[i * CY_FX_SIB_PARTITIONS + j] = 10; /* Invalid value. */
glLunWriteable[i * CY_FX_SIB_PARTITIONS + j] = CyTrue;
glLunBlkSize[i * CY_FX_SIB_PARTITIONS + j] = 0;
glLunNumBlks[i * CY_FX_SIB_PARTITIONS + j] = 0;
}
/* Query each of the storage ports to identify whether a device has been
detected. */
status = CyU3PSibQueryDevice (i, &glDevInfo[i]);
if (status == CY_U3P_SUCCESS)
{
CyU3PDebugPrint (8, "Found a device on port %d\r\n", i);
CyU3PDebugPrint (6, "\tType=%d, numBlks=%d, eraseSize=%d, clkRate=%d\r\n",
glDevInfo[i].cardType, glDevInfo[i].numBlks, glDevInfo[i].eraseSize,
glDevInfo[i].clkRate);
CyU3PDebugPrint (6, "\tblkLen=%d removable=%d, writeable=%d, locked=%d\r\n",
glDevInfo[i].blkLen, glDevInfo[i].removable, glDevInfo[i].writeable,
glDevInfo[i].locked);
CyU3PDebugPrint (6, "\tddrMode=%d, opVoltage=%d, busWidth=%d,
numUnits=%d\r\n", glDevInfo[i].ddrMode,
glDevInfo[i].opVoltage, glDevInfo[i].busWidth,
glDevInfo[i].numUnits);
CyU3PDebugPrint (6, "\tcardCmdClass=%d\r\n", glDevInfo[i].ccc);
/* Run through each of the units present and check how many data partitions
are present. We skip all boot partitions in this application.
*/
for (j = 0; j < glDevInfo[i].numUnits; j++)

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