2022-03-11 08:17 AM
I am currently programming an eMMC(SDMMC) card with an STM32U575 microcontroller.
In 4 bit mode it works perfectly, but in 8 bit mode, I have a CRC error (HAL_MMC_ERROR_DATA_CRC_FAIL) in the HAL_MMC_ReadBlocks function called by fx_media_open.
NB: I call fx_media_format before fx_media_open.
When I compare the data I get in 4 bits and 8 bits mode, the first byte is not the same.
Any idea about that error?
Thanks in advance.
2022-03-11 02:27 PM
Unfortunately don't have any U5 boards, and ones I can find don't look to support 8-bit eMMC
Looks like a timing/synchronization issue possibly.
Does it work if you half the speed?
I did get 8-bit eMMC working quite well on the H745-DISCO/H750-DK boards. Needed to use DMA to service burst transfer rates.
2022-03-14 01:53 AM
Hi @Community member
I tried it, it doesn't change anything. It is the same error.
2022-04-14 08:21 AM
Hi @Community member
Which eMMC did you use, have you found the evaluation board on internet. Could you please send me the link?
2022-04-14 09:13 AM
Between myself, and those I've worked with, Toshiba, Samsung, SanDisk, Kingston, Greenliant in various sizes up to 128GB. Predominantly used ODROID modules (based on cost/availability), clamshell fixturing, and custom boards (where 8-bit and signal integrity was important).
The behaviour of 256 and 512 GB device should be similar, they just weren't cost effective, certainly in board-bringup / validation context, but FatFs has been tested out to 400 GB, but that's getting to the outer fringe of what makes sense on a MCU.
2022-04-15 03:10 AM
And with greenliant EVB, people you worked with never met CRC failed problem in 8 bit mode for HAL_MMC_ReadBlocks. That's surprising.
2022-04-16 02:03 AM
> the first byte is not the same
It's not just different - the first byte is missing and the whole block in the second screenshot is shifted by one byte.
2022-05-12 06:27 AM
Yes, I'm trying to understand what's wrong. Write function works in 8 bit mode but read function does not