Skip to main content
Associate III
August 29, 2024
Solved

SDMMC1 SD Card card initialization failure in STM32H757 i-EVAL Board

  • August 29, 2024
  • 1 reply
  • 1657 views

Hello,

we bought a STM32H757 i-EVAL and I started to play with it. So I chose the board in STMCUBE MX (version 6.12.0) and selected the default configuration. After compiling code which went well, it got stuck in the MX_SDMMC1_SD_Init function, with the following error: HAL_SD_ERROR_UNSUPPORTED_FEATURE,
So after reviewing couple of posts here, i figured out that there is a mistake in auto-generated codes from Cube, so I changed "hsd1.Init.TranceiverPresent " to SDMMC_TRANSCEIVER_PRESENT instead of SDMMC_TRANSCEIVER_NOT_PRESENT. Here Sd init function now:

 

 

 hsd1.Instance = SDMMC1;
 hsd1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
 hsd1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
 hsd1.Init.BusWide = SDMMC_BUS_WIDE_4B;
 hsd1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;
 hsd1.Init.ClockDiv = 0;
 hsd1.Init.TranceiverPresent = SDMMC_TRANSCEIVER_PRESENT;

 

To be honest, it seemed solved the problem but after couple of tests, it again crashes with the same error.
Any help would be highly appreciated. ( I have attached my .ioc file for reference)

Amir

    Best answer by mƎALLEm

    Hello,

    Try first to run the native example working on STM32H747I-EVAL board provided in the STM32CubeH7 in here: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H747I-EVAL/Applications/FatFs/FatFs_Dual_Instance

    At least to validate your SDcard.

    1 reply

    mƎALLEm
    mƎALLEmBest answer
    Technical Moderator
    August 30, 2024

    Hello,

    Try first to run the native example working on STM32H747I-EVAL board provided in the STM32CubeH7 in here: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H747I-EVAL/Applications/FatFs/FatFs_Dual_Instance

    At least to validate your SDcard.

    To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.