stm32/stm32f30xxx_rcc.c: fix broken flash setup

During removal of F1 related stuff, code that configures FLASH
latency was removed, which rendered some of the F3 line unbootable.

It was done by mistake, since previous removed block was
'#ifdef VALUE_LINE', and block with FLASH code was '#ifndef VALUE_LINE'
and so it should not have been removed.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
This commit is contained in:
Michał Łyszczek 2024-02-22 18:32:46 +01:00 committed by Mateusz Szafoni
parent 9b0017659c
commit aa75b7f27c

View file

@ -476,6 +476,13 @@ static void stm32_stdclockconfig(void)
#endif
/* Enable FLASH prefetch buffer and set FLASH wait states */
regval = getreg32(STM32_FLASH_ACR);
regval &= ~FLASH_ACR_LATENCY_MASK;
regval |= (FLASH_ACR_LATENCY_SETTING | FLASH_ACR_PRTFBE);
putreg32(regval, STM32_FLASH_ACR);
/* Set the HCLK source/divider */
regval = getreg32(STM32_RCC_CFGR);