CubeMX wrong generation of HAL_SD_MspInit for SDMMC2 STM32U5G9ZJT6Q
Hello,
I stumbled upon a cubemx generation issue for sdmmc2 for the stm32u5g9zjt6q (I didn't have this issue with some other stm32u5xx).
For a basic cubemx configuration of sdmmc2, the HAL_SD_MspInit is wrongly generated. It is a bit annoying as I have to manually edit the file for each code generation or create my own overload function (not a huge effort I concede).
In the Src/stm32u5xx_hal_msp.c, void HAL_SD_MspInit(SD_HandleTypeDef* hsd) calls
__HAL_RCC_SDMMC1_CLK_ENABLE();instead of
__HAL_RCC_SDMMC2_CLK_ENABLE();Same for void HAL_SD_MspDeInit(SD_HandleTypeDef* hsd) with the __HAL_RCC_SDMMC1_CLK_DISABLE()
I might be the only one to experience it but I put it here just in case.
