This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EMMC read and write issue

Other Parts Discussed in Thread: DM3730

Hi everyone,

I am encountering an EMMC read/write issue. After I initialized both the emmc card and omap, the card entered tran state. My read and write command never succeed. Here is what I have done:

  1. Send CMD0 (MMCHS_CMD = 0x00000000 MMCHS_ARG = 0xf0f0f0f0)
  2. While busy send CMD1 (MMCHS_CMD =  0x01020000 MMCHS_ARG = 0x40FF8080)
  3. Send CMD2 (MMCHS_CMD = 0x02090000 MMCHS_ARG = 0x00000000)
  4. Send CMD3 (MMCHS_CMD = 0x031a0000 MMCHS_ARG = 0x00010000) Response = 0x500 Ident State
  5. m_regs->MMCHS_CON &= ~0x00000001; 
  6. Send CMD9 (MMCHS_CMD = 0x009090000 MMCHS_ARG = 0x00010000)
  7. Send CMD13 Check status (MMCHS_CMD = 0x0D1a0000 MMCHS_ARG = 0x00010000) Response = 0x700
  8. Send CMD7 (MMCHS_CMD = 0x071a0000 MMCHS_ARG = 0x00010000) Response = 0x700
  9. While not recv state, send CMD6 (MMCHS_CMD = 0x061a0000 MMCHS_ARG = 0x03b90100)  Response = 0x800
  10. Set clock to 48 MHz
  11. Send CMD 16 (MMCHS_CMD = 0x101a0000 MMCHS_ARG = 0x00000200)  
  12. Send CMD13 Check status (MMCHS_CMD = 0x0D1a0000 MMCHS_ARG = 0x00010000) Response = 0x900

After the steps above, I tried to send command CMD24 (MMCHS_CMD = 0x182A0002 MMCHS_ARG = 0x00000001 and MMCHS_BLK = 0x00000200), the Omap successfully enter the MMCHS_STAT_BWR and then I send the 512 bytes data. I can observe those data sending out through the data line by using a oscilloscope but then when I was polling the TC/DTO, I received a 0x108111 from MMCHS_STAT which indicate a Data time out. I can receive a response 0x900 for the command. 

For the reading, I would send CMD17(MMCHS_CMD = 0x112A0012 MMCHS_ARG = 0x00000001 and MMCHS_BLK = 0x00000200).  I can also receive a response 0x900 for the command. The Omap successfully enter the MMCHS_STAT_BRR but I could not observe any data sending through the data line. 

Please let me know if you find any issue on the steps I have done or you have an example to make it work. And thanks a lot for all your helps