From f010ff0eca0c2794705f1a476ff30235469cb42b Mon Sep 17 00:00:00 2001 From: Fabien Poussin Date: Thu, 9 Jan 2020 11:21:14 +0100 Subject: [PATCH] Fixed delay in sdram driver (#210) --- os/hal/ports/STM32/LLD/FSMCv1/hal_sdram_lld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/hal/ports/STM32/LLD/FSMCv1/hal_sdram_lld.c b/os/hal/ports/STM32/LLD/FSMCv1/hal_sdram_lld.c index 66f7b80..0353bb3 100644 --- a/os/hal/ports/STM32/LLD/FSMCv1/hal_sdram_lld.c +++ b/os/hal/ports/STM32/LLD/FSMCv1/hal_sdram_lld.c @@ -106,7 +106,7 @@ static void sdram_lld_init_sequence(const SDRAMConfig *cfgp) { SDRAMD1.sdram->SDCMR = FMCCM_CLK_ENABLED | command_target; /* Step 4: Insert delay (tipically 100uS).*/ - osalThreadSleepMilliseconds(1); + osalSysPolledDelayX(OSAL_US2RTC(STM32_HCLK, 100)); /* Step 5: Configure a PALL (precharge all) command.*/ sdram_lld_wait_ready();