Skip to main content
Associate II
March 13, 2026
Question

STM32H753I-EVAL2: HAL_SD_Init() fails at CMD55 with HAL_SD_ERROR_CMD_RSP_TIMEOUT

  • March 13, 2026
  • 2 replies
  • 416 views

I am trying to use the microSD card on the STM32H753I-EVAL2 board with ThreadX and FileX.

I generated the base project using CubeMX with the following configuration:

Board: STM32H753I-EVAL2
Peripheral: SDMMC1 enabled
Middleware: ThreadX + FileX
Option "Is external transceiver present?" = Yes (since the board uses the IP4856CX35)
Default CubeMX clock configuration

However, the generated code fails during initialization at:

HAL_SD_Init(&hsd1);

inside:

MX_SDMMC1_SD_Init()

After debugging further, I found the failure occurs inside SD_PowerON() when sending CMD55 (APP_CMD).

The error returned is:

HAL_SD_ERROR_CMD_RSP_TIMEOUT

From stepping through the code:

SD_PowerON()
-> SDMMC_CmdAppCommand()
-> CMD55
-> HAL_SD_ERROR_CMD_RSP_TIMEOUT

So the card never responds to CMD55.

Additional observations: CubeMX configures the SDMMC1 kernel clock to 150 MHz. From the reference manual / datasheet, it seems the maximum SDMMC kernel clock should be around 125 MHz.I am not sure if this clock configuration could be related to the issue.

But the initialization still fails at CMD55.

Questions:Is a 150 MHz SDMMC kernel clock supported on STM32H753?Is there any additional initialization required for the external SD transceiver (IP4856CX35) on this board?Is there a known issue with CubeMX generated SDMMC code for STM32H753I-EVAL2?

2 replies

AScha.3
Super User
March 14, 2026

Set the clock for SD-card to 50MHz .

As this is max frequency for SD-card.

And set 1bit mode at first, as 4bit mode more difficult.

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
pranavpsAuthor
Associate II
March 16, 2026
static void MX_SDMMC1_SD_Init(void)
{
 /* USER CODE BEGIN SDMMC1_Init 0 */
 /* USER CODE END SDMMC1_Init 0 */

 /* USER CODE BEGIN SDMMC1_Init 1 */
 /* USER CODE END SDMMC1_Init 1 */

 hsd1.Instance = SDMMC1;
 hsd1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
 hsd1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
 hsd1.Init.BusWide = SDMMC_BUS_WIDE_1B;
 hsd1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;
 hsd1.Init.ClockDiv = 0;
 hsd1.Init.TranceiverPresent = SDMMC_TRANSCEIVER_PRESENT;
 if (HAL_SD_Init(&hsd1) != HAL_OK)
 {
 Error_Handler();
 }
 /* USER CODE BEGIN SDMMC1_Init 2 */
 /* USER CODE END SDMMC1_Init 2 */
}

 

image.png

tried with the above configuration . Still no luck.

Still fails
HAL_SD_Init ->
HAL_SD_InitCard ->
SD_PowerON

 

while ((count < SDMMC_MAX_VOLT_TRIAL) && (validvoltage == 0U))
{
 /* SEND CMD55 APP_CMD with RCA as 0 */
 errorstate = SDMMC_CmdAppCommand(hsd->Instance, 0);
 if (errorstate != HAL_SD_ERROR_NONE)
 {
 return errorstate; //fails here with SDMMC_ERROR_CMD_RSP_TIMEOUT
 }

 


Edited to apply source code formatting - please see How to insert source code for future reference.

AScha.3
Super User
March 16, 2026

Well, i dont know, what you doing there....

my access to sd-card is just this : 

1. the cube generated code ... (static void MX_SDMMC2_SD_Init(void); ) as it is.

2. in filex ->  I mount card

 void fx_app_thread_entry(ULONG thread_input)
 {

 UINT sd_status = FX_SUCCESS;

/* USER CODE BEGIN fx_app_thread_entry 0*/
 sd_statusx = -1;
 tx_thread_sleep(500);									// wait 500ms for sdcard startup
/* USER CODE END fx_app_thread_entry 0*/

/* Open the SD disk driver */
 sd_status = fx_media_open(&sdio_disk, FX_SD_VOLUME_NAME, fx_stm32_sd_driver, (VOID *)FX_NULL, (VOID *) fx_sd_media_memory, sizeof(fx_sd_media_memory));

/* Check the media open sd_status */
 if (sd_status != FX_SUCCESS)
 {
 /* USER CODE BEGIN SD DRIVER get info error */
	 printf(" SD mount error ! \r\n");
 Error_Handler(); 
 /* USER CODE END SD DRIVER get info error */
 }

btw

Wait 0.5 s after start/power_up  is important, most cards not responding without some start delay time.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ST Employee
March 18, 2026

Hello,

Just a general remark: if the initialization sequence fails, it is most likely related to a pinout issue, or to a corrupted SD card.

As a quick check before going further, could you please:

  • Test your example without any SD card, and
  • Test again with another SD card

This will help us confirm that the issue is not related to the SD connector or the card itself.

BR,
Ahmed