Skip to main content
Explorer
September 21, 2026
Question

SDMMC init fails at SD_PowerON() with SDMMC_ERROR_CMD_RSP_TIMEOUT in STM32U575

Hi all,

My MX_SDMMC1_SD_Init() is failing and dropping into Error_Handler() on a custom STM32U575RGT6 board.

I traced it down to SD_PowerON() failing — it returns HAL_SD_ERROR_UNSUPPORTED_FEATURE. Digging deeper, this happens because one of the internal response-check calls (SDMMC_GetCmdResp1() / GetCmdResp2() / GetCmdResp3()) is returning SDMMC_ERROR_CMD_RSP_TIMEOUT (the CTIMEOUT flag gets set) — basically the card isn't responding to one of the commands sent during power-on/init.



i have checked HAL_SD_InitCard() clock divider formula where  HAL correctly computes ClockDiv = 21 for 16 MHz kernel clock also measured SDMMC_CK on oscilloscope and getting 381.7 kHz which is within spec (≤400 kHz)

we have external pull ups at all pins of sdmmc 
plus when i run on this fun SDMMC_CmdAppCommand i can see activity on CMD line but i didnt get any response on that line.

the clock i’m giving is HSE PLL1P to SDMMC clock mux which is 16Mhz final 

 

1 reply

ST Employee
October 12, 2026

Hello,

Your clock is fine — 16 MHz / (2×21) = 381 kHz, exactly what you measured and within spec. So the divider isn't the issue.


The real symptom is CTIMEOUT: the command goes out but the card never answers. That's an electrical/power problem, not a HAL issue, try for example to use other sd cards.

One thing to double-check: in SD_PowerON(), UNSUPPORTED_FEATURE is only returned after CMD8 has already answered (card = V2). If the card truly never responds, CMD8 times out and you'd get CMD_RSP_TIMEOUT instead. to confirm this please put breakpoint CMD8 vs CMD55 and confirm which one actually fails.

Br,