Skip to main content
JBurg.5
Associate II
February 5, 2025
Question

STM32 SDIO SD card initialization

  • February 5, 2025
  • 1 reply
  • 686 views

Hi,

I have an STM32F7 design with SD card connected via SDIO interface.

In many posts I read that SD cards have to be initialized with a 1 bit wide bus and a clock of 400 kHz. Switching the bus width from 1 to 4 bit using the command HAL_SD_ConfigWideBusOperation(&hsd1, SDMMC_BUS_WIDE_4B) is simple. However, I have some doubts about the clock frequency. Many examples inizialize the clock at higher frequencies in the first initialization. This seems to contradict the SD card specification.

Best regards

Jan

1 reply

I.KHACHINE
ST Employee
May 20, 2025

Hi JBurg.5,

In our SD driver, in initialization API, we are forcing the card initialization to use 1bit @400Khz, then switching the user settings configured in init structure. I confirm that the Initialization is compliant with the SD Standard.
I hope that is clear now.

Best Regards,
Ismail