cancel
Showing results for 
Search instead for 
Did you mean: 

any idea about SDMMC CRC error with HAL_MMC_ReadBlocks function?

j.kouadio
Associate III

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.

0693W00000KcIG8QAN.png0693W00000KcIGrQAN.png

7 REPLIES 7

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
j.kouadio
Associate III

Hi @Community member​ 

I tried it, it doesn't change anything. It is the same error.

Hi @Community member​ 

Which eMMC did you use, have you found the evaluation board on internet. Could you please send me the link?

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

And with greenliant EVB, people you worked with never met CRC failed problem in 8 bit mode for HAL_MMC_ReadBlocks. That's surprising.

Piranha
Chief II

> 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.

Yes, I'm trying to understand what's wrong. Write function works in 8 bit mode but read function does not