[HAL][SDMMC] Fix an issue in HAL_SD_Init with SDMMC_BUS_WIDE_4B
diff --git a/Src/stm32f4xx_hal_sd.c b/Src/stm32f4xx_hal_sd.c index 8e27a52..5fca9f3 100644 --- a/Src/stm32f4xx_hal_sd.c +++ b/Src/stm32f4xx_hal_sd.c
@@ -380,7 +380,13 @@ { return HAL_ERROR; } - + + /* Configure the bus wide with the specified value in the SD_HandleTypeDef */ + if(HAL_SD_ConfigWideBusOperation(hsd, hsd->Init.BusWide) != HAL_OK) + { + return HAL_ERROR; + } + /* Initialize the error code */ hsd->ErrorCode = HAL_SD_ERROR_NONE; @@ -2748,9 +2754,6 @@ return errorstate; } - /* Configure SDIO peripheral interface */ - (void)SDIO_Init(hsd->Instance, hsd->Init); - /* All cards are initialized */ return HAL_SD_ERROR_NONE; }