diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c index 25da1792..e635323d 100644 --- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c +++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c @@ -125,7 +125,7 @@ static void _sdram_init_sequence(const SDRAMConfig *cfgp) { /* Step 8: Set clock.*/ _sdram_wait_ready(); - SDRAMD.sdram->SDRTR = cfgp->sdrtr; + SDRAMD.sdram->SDRTR = cfgp->sdrtr & FMC_SDRTR_COUNT; _sdram_wait_ready(); }