Skip to content

Commit 201cf8f

Browse files
committed
L4_HAL/sd: Fix bug with incorrect use of Init.ClockDiv.
Signed-off-by: Damien George <[email protected]>
1 parent a4f45b9 commit 201cf8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2757,7 +2757,7 @@ HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation(SD_HandleTypeDef *hsd, uint32_t
27572757

27582758
Init.Transceiver = hsd->Init.Transceiver;
27592759
#else
2760-
if ((sdmmc_clk / (Init.ClockDiv + 2U)) > SD_NORMAL_SPEED_FREQ)
2760+
if ((sdmmc_clk / (hsd->Init.ClockDiv + 2U)) > SD_NORMAL_SPEED_FREQ)
27612761
{
27622762
Init.ClockDiv = ((sdmmc_clk / SD_NORMAL_SPEED_FREQ) - 2U);
27632763
}

0 commit comments

Comments
 (0)