Skip to main content
Visitor II
March 24, 2025
Question

STM32L451 - eMMC CRC error at init when reading ExtCSD

  • March 24, 2025
  • 1 reply
  • 1421 views

Hello,

I'm working on a custom board with a STM32L451 and an emmc (THGBMNG5D1LBAIL - 4gb). At initialization (using the HAL generated init functions), I get the CID and CSD but not the ExtCSD. I get a CRC error (in polled mode as well as in DMA mode). Since it is at the initialization, I cannot change a lot of settings...(main clock is at 80Mhz but at lower clock value I get the same issue) I've seen that I need to set "half-word" in the DMA settings in order to have a same alignment as in polled mode...But obviously doesn't help since I get the same error in both cases... (with or without misalignment)

Do you have any idea on what direction I could look at?

 

Thanks a lot!

 

clock config:

thinkerfox_seb_0-1742812127260.pngthinkerfox_seb_1-1742812135403.png

SDMMC settings:

thinkerfox_seb_2-1742812174989.pngthinkerfox_seb_3-1742812197635.png

 

This topic has been closed for replies.

1 reply

ST Technical Moderator
March 28, 2025

Hello @thinkerfox_seb 

Could you please share your code and give more details about the issue. Mybe you can share register content before and after the problem occur. 


@thinkerfox_seb wrote:

Hello,

I'm working on a custom board with a STM32L451 and an emmc (THGBMNG5D1LBAIL - 4gb). At initialization (using the HAL generated init functions), I get the CID and CSD but not the ExtCSD. I get a CRC error (in polled mode as well as in DMA mode). Since it is at the initialization,


It is not clear; the issue occurs at initialisation or at polling or DMA process?

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om