cancel
Showing results for 
Search instead for 
Did you mean: 

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

pranavps
Associate II

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?

10 REPLIES 10
GAA
ST Employee

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