Skip to main content
Jack3
Senior
Sep 12, 2019 6:36 PM UTC
Question

STM32Cube STM32H7 firmware 1.5.0, when fix SDMMC init?

Hello, I use STM32CubeMX and use the latest STM32H7 (1.5.0) firmware.

When may the MX_SDMMC1_SD_Init finally be fixed?

The function still looks like this, which will accomplish nothing, really:

void MX_SDMMC1_SD_Init(void)
{
 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 = 25;
}

Should it better look something like this, at least calling HAL_SD_Init too, or is it not needed to do so?

void MX_SDMMC1_SD_Init(void)
{
 HAL_StatusTypeDef status;
 
 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 = 25;
 
 status = HAL_SD_Init(&hsd1);
 if (status != HAL_OK)
 {
 Error_Handler();
 }
}

 Has the library for SDMMC been tested using the first code? Does it work that way?

 I believe for me only the second variant works.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
Sep 12, 2019 6:59 PM UTC

I think it is pretty apparent that ST doesn't have any kind of test matrix for the automated code generation.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Jack3
Jack3Author
Senior
Sep 13, 2019 5:02 PM UTC

When I compare the different STM32H7 firmware (1.4.0 vs 1.5.0), I notice they focus on correcting preceding and trailing spaces in the source code mostly.

I think to have the code correct is more important. :)