2026-02-26 6:25 AM
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
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.
2026-03-02 1:30 AM
Hello,
What do you mean by?!:
@Ekeshwari wrote:
The board is currently tested using the DATA3 line only
How do you expect that it will work normally with only DATA3 line in 4-bit mode?
2026-03-02 4:35 AM
Data 3 line is used to detect the card first. Then after the card is initialized it goes back to being the data line. But that is not the issue my card initialization itself fails (even in 1 bit mode), even when I use a GPIO as card detect pin. HAL_SD_Init() this returns an error