SDIO initialization fails on STM32F439 for SD card interfacing
- February 26, 2026
- 2 replies
- 250 views
I am working with [STM32F439ZI] and I am trying to initialize SDIO in 4-bit mode.
I'm following "STM32 – Creating a File System on a SD card" this video for reference.
However, SDIO initialization is failing during the power-on phase.
The error occurs during HAL_SD_Init()
The failure happens inside the power-on initialization sequence
The function always returns an error status
The board is currently tested using the DATA3 line only (this is the only difference from a standard setup)
Even when I modify the function / test return values, the error still occurs at power-on initialization
- I changed the function for card detect so that the return status is always "card present".
The error occurs in
errorstate = SDMMC_CmdAppCommand(hsd->Instance, 0);
if(errorstate != HAL_SD_ERROR_NONE)
{
return HAL_SD_ERROR_UNSUPPORTED_FEATURE;
}
}
This function returns a CRC error.
I have attached the hardware changes I did along with the clock config settings and sdio settings. Please help me resolve it.
