Skip to content
Snippets Groups Projects
Commit b33f108c authored by Damien George's avatar Damien George
Browse files

stm32/sdcard: Properly reset SD periph when SDMMC2 is used on H7 MCUs.

parent c9326390
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment