stm32/sdcard: Properly reset SD periph when SDMMC2 is used on H7 MCUs.
This commit is contained in:
parent
c932639063
commit
b33f108cde
|
@ -169,9 +169,14 @@ void HAL_SD_MspInit(SD_HandleTypeDef *hsd) {
|
|||
|
||||
#if defined(STM32H7)
|
||||
// Reset SDMMC
|
||||
#if defined(MICROPY_HW_SDMMC2_CK)
|
||||
__HAL_RCC_SDMMC2_FORCE_RESET();
|
||||
__HAL_RCC_SDMMC2_RELEASE_RESET();
|
||||
#else
|
||||
__HAL_RCC_SDMMC1_FORCE_RESET();
|
||||
__HAL_RCC_SDMMC1_RELEASE_RESET();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// NVIC configuration for SDIO interrupts
|
||||
NVIC_SetPriority(SDMMC_IRQn, IRQ_PRI_SDIO);
|
||||
|
|
Loading…
Reference in New Issue