AM2634-Q1: mmcsd module issues

Part Number: AM2634-Q1

Tool/software:

Hi all,

I am having some problems debugging SDIO with TI AM263x and MCU+SDK (10.02.00.13):

  1. I send and receive commands using Poll Mode:

    Response is set, but after the MMCSD_lld_cmdCompleteStatusPoll does not report an error, MMCSD_getResponse within MMCSD_lld_transferPoll does not get the correct response and a delay needs to be added manually. The logic analyzer confirms that the opposite end has replied.
    The device has been set to require Response, does not reply Response to the end, However, MMCSD_lld_cmdCompleteStatusPoll did not return any errors, the code was correct, and the log did not have a related flag bit.
    Code BUG:
    The cmdErrorStat and xferErrorStat for MMCSDLLD_Object are of type uint16_t, but the assignment code format in the library is: Object->xferErrorStat = (intrStatus & 0xFFFF0000U);
    This causes the error flag bit to always be 0.
  2. Is there a recommendation for SDIO initialization? After the host-side initialization is complete, the SDIO device initialization has a large number of commands and register operations that require knowledge of the SDIO specification, which could result in a mismatch of the two parameters
  3. I need the Asynchronous Interrupt (DAT[1]) function. The Registers can locate MMC_AC2 -> AI_ENABLE. However, no example for handling this interrupt has been found. Are there any relevant materials?

Regards,

Jenney

  • HI Jenney,

    I have read the MMCSD driver. The driver doesn't support the dedicated SDIO commands, for example CMD52, CMD53, CMD5, CMD6 etc. The MMCSD hardware interface on AM263x devices supports MMC spec rev up to 4.3, and SD, SDIO rev 2.00. The maximum data rate of SD rev2.0 is 25MB/s. The MMC Rec4.3 supports maximum data rate up to 50MB/s. 

    What kind of SDIO card are you using for test with SDK 10.02? Is it 1-bit data transfer mode or 4-data transfer mode used? Which SD commands are you using?

  • Hi Qingjun,

    1. WIFI SDIO card;
    2. 4-bit data transfer mode;
    3. SD commands: initiate- CMD5CMD3CMD7,transfer data-CMD52CMD53;
      So the phenomenon of sending and receiving in poll mode is caused by CMD52 and CMD53,right?  Do you have the transferring data commands recommended?  
  • Hi Jenney,

    I am sorry I don't have a SDIO WIFI card or BT card to test the SDK MMCSD driver. The MMCSD driver doesn't support CMD5 (IO SEND OP COND), CMD52 (IO_RW_DIRECT) and CMD53 (IO_RW_EXTENDED) which are specific commands for SDIO.

    The CMD5 is used to initiate the SDIO card and check its readiness. The CMD52 is to read or write a single byte or short register directly. The CMD53 is used to read or write multiple bytes or blocks of data, allowing for efficient, extended data transfers from the device. 

    You can use CMD17 (read single block) for byte read, and CMD24 (write single block) for byte write, and use CMD18 (read multiple block) for block read, and CMD25 for block write (write multiple block). This is my understanding, and you can try them.

  • Hi Qingjun,

    How about  CMD5? What commands you recommend for SDIO initialization?  

    Regards,

    Jenney

  • Hi Jenney,

    In the SDIO protocol, CMD5 is used during the initialization phase to query the I/O Operation Conditions Register (OCR) of an SDIO card. It helps determine the card's voltage range and whether it supports SDIO functionality.

    I don't see an equivalent CMD. You may try to use ACMD41 (CMD55 + CMD41) to get the OCR.