cancel
Showing results for 
Search instead for 
Did you mean: 

Version 6.15.0 Incorrectly Forces SD Initialization with FatFs Library

cvanbeek
Associate III

When I upgraded to STM32CubeMx version 6.15.0, my project that uses FatFs added a call to HAL_SD_Init() inside MX_SDMMC1_SD_Init() when I regenerated code:

cvanbeek_0-1753312529733.png

This is incorrect behavior because the FatFs library calls HAL_SD_Init() from BSP_SD_Init if the SD card is present, based on the configured Detect_SDIO pin in the CubeMx Platform settings.  The newly generated code in version 6.15 causes the ErrorHandler() to be called on power-up if there is no SD card attached.

cvanbeek_1-1753312667573.png

cvanbeek_2-1753312697411.png

I'm using an STM32H7B3.  I attached an example ioc file that shows this issue.  The code was correct in version 6.14

 

1 REPLY 1
Souhaib MAZHOUD
ST Employee

Hello @cvanbeek 

Thank you for bringing this issue to our attention. I am currently checking this issue internally.

I'll get back to you as soon as possible.

KR,

Souhaib

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.