STMicroelectronics / STM32CubeF2

STM32Cube MCU Full Package for the STM32F2 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
39 stars 24 forks source link

stm32f2xx_hal_mmc.c use SDMMC_STATIC_FLAGS instead of SDIO_STATIC_FLAGS #14

Closed RetoFx closed 3 weeks ago

RetoFx commented 1 month ago

In file stm32f2xx_hal_mmc.c function HAL_MMC_ConfigWideBusOperation() is SDMMC_STATIC_FLAGS used instead of SDIO_STATIC_FLAGS

SDMMC_STATIC_FLAGS is defined in stm32_hal_legacy.h. But for new projects stm32_hal_legacy.h should not be used.

Either you replace SDMMC_STATIC_FLAGS with SDIO_STATIC_FLAGS or you add the following code to stm32f2xx_hal_mmc.c (and similar files)

if !defined( SDMMC_STATIC_FLAGS )

if defined( SDIO_STATIC_FLAGS )

define SDMMC_STATIC_FLAGS SDIO_STATIC_FLAGS

endif

endif

if !defined( SDIO_STATIC_FLAGS )

if defined( SDMMC_STATIC_FLAGS )

define SDIO_STATIC_FLAGS SDMMC_STATIC_FLAGS

endif

endif

then both symboles are defined

KRASTM commented 1 month ago

ST Internal Reference: 186496

KRASTM commented 3 weeks ago

Fixed in commit https://github.com/STMicroelectronics/STM32CubeF2/commit/190a39c1bdbea901648ed167af4e12a45f923546