Skip to content

Commit

Permalink
L4_HAL/sd: Fix bug with incorrect use of Init.ClockDiv.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Dec 13, 2021
1 parent 602717f commit 1eebcda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,7 @@ HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation(SD_HandleTypeDef *hsd, uint32_t

Init.Transceiver = hsd->Init.Transceiver;
#else
if ((sdmmc_clk / (Init.ClockDiv + 2U)) > SD_NORMAL_SPEED_FREQ)
if ((sdmmc_clk / (hsd->Init.ClockDiv + 2U)) > SD_NORMAL_SPEED_FREQ)
{
Init.ClockDiv = ((sdmmc_clk / SD_NORMAL_SPEED_FREQ) - 2U);
}
Expand Down

0 comments on commit 1eebcda

Please sign in to comment.