Associate III
July 23, 2025
Question
Version 6.15.0 Incorrectly Forces SD Initialization with FatFs Library
- July 23, 2025
- 4 replies
- 382 views
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:

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.


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