mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 07:28:38 +08:00
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:
parent
9b0017659c
commit
aa75b7f27c
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue