diff --git a/os/hal/ports/STM32/LLD/sdc_lld.c b/os/hal/ports/STM32/LLD/sdc_lld.c index c3b95c688..1aca84fb0 100644 --- a/os/hal/ports/STM32/LLD/sdc_lld.c +++ b/os/hal/ports/STM32/LLD/sdc_lld.c @@ -380,6 +380,9 @@ void sdc_lld_start_clk(SDCDriver *sdcp) { SDIO->CLKCR = STM32_SDIO_DIV_LS; SDIO->POWER |= SDIO_POWER_PWRCTRL_0 | SDIO_POWER_PWRCTRL_1; SDIO->CLKCR |= SDIO_CLKCR_CLKEN; + + /* Clock activation delay.*/ + osalThreadSleep(MS2ST(STM32_SDC_CLOCK_ACTIVATION_DELAY)); } /** diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index c75397291..d18f37b55 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -200,9 +200,6 @@ bool sdcConnect(SDCDriver *sdcp) { /* Card clock initialization.*/ sdc_lld_start_clk(sdcp); - /* Clock activation delay.*/ - osalThreadSleep(MS2ST(STM32_SDC_CLOCK_ACTIVATION_DELAY)); - /* Enforces the initial card state.*/ sdc_lld_send_cmd_none(sdcp, MMCSD_CMD_GO_IDLE_STATE, 0);