cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L451 - eMMC CRC error at init when reading ExtCSD

thinkerfox_seb
Associate

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

 

1 REPLY 1
Saket_Om
ST Employee

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?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om