eMMC 5.1 Middleware

Hello,

I connected an eMMC 5.1 memory of type KLMAG1JETD-B041 to a XMC4700 Relax-Kit evaluation board. Wehn I call fformat() or fmount() from the file system API, the functions return fsMediaError. I am using an SD-Card adapter to connect it. The memory ist working when connected to a PC. I tried a FAT32 formatted memory and a blank memory. Does the Middleware (v7.16)  file system support eMMC devices?

Best Regards,

Stephan

Parents
  • Hello,

    mounting of the Samsung KLMAG1JETD-B041 eMMC card is working now. I can read and write files.
    It's quite possible, that this behaviour is specific for this card.

    I made changes in the function mc_native_init() in fs_mc_mci.c:
    - Do not send command CMD0
    - Do not send command CMD8
    - Do not send Command CMD41
    - Send command 0xFFFFFFFA (pre-boot state)
    - Send CMD0 command
    - Before sending CMD8 (ECSD), increase the bus speed to 25MHz

    Best Regards,
    Stephan

Reply
  • Hello,

    mounting of the Samsung KLMAG1JETD-B041 eMMC card is working now. I can read and write files.
    It's quite possible, that this behaviour is specific for this card.

    I made changes in the function mc_native_init() in fs_mc_mci.c:
    - Do not send command CMD0
    - Do not send command CMD8
    - Do not send Command CMD41
    - Send command 0xFFFFFFFA (pre-boot state)
    - Send CMD0 command
    - Before sending CMD8 (ECSD), increase the bus speed to 25MHz

    Best Regards,
    Stephan

Children
  • Thank you for coming back with the solution to the problem. I'm unsure why this workaround is required, would need to dig deeply into SD/eMMC specifications as usually eMMC should just work. The device identification procedure in mc_native_init should not cause issues even though it first tries to identify SD card and is therefore sending commands that eMMC does not understand. Especially because device datasheet claims full backward compatibility. Will investigate.

    Thanks again.

  • Hello,

     

    when testing with our new hardware having eMMC populated, I get stuck in a function called mc_wfe() in the fs_mc_mci.c file. The description says, "Wait for event from MCI driver till 3 second timeout". The function calls fs_get_sys_tick_us(3000000) which returns the MCU clock frequency multiplied with 3 seconds, which is 432.000 on our 144MHz CPU. Then the function calls fs_get_sys_tick() which returns the RTOS ticks in milli-seconds. Then the functions wait's 432 seconds to timeout instead of 3 seconds. Can anybody confirm this behavior?

     

    Thanks in advance,

    Stephan