stm32f0: rcc: Enable prefetch buffer in rcc_clock_setup_*()
Prefetch buffer makes the code execution from the Flash memory faster. Signed-off-by: Adam Heinrich <adam@adamh.cz>
This commit is contained in:
parent
8f892a8e81
commit
e9a8c5106e
@ -543,6 +543,7 @@ void rcc_clock_setup_in_hse_8mhz_out_48mhz(void)
|
||||
rcc_set_hpre(RCC_CFGR_HPRE_NODIV);
|
||||
rcc_set_ppre(RCC_CFGR_PPRE_NODIV);
|
||||
|
||||
flash_prefetch_buffer_enable();
|
||||
flash_set_ws(FLASH_ACR_LATENCY_024_048MHZ);
|
||||
|
||||
/* PLL: 8MHz * 6 = 48MHz */
|
||||
@ -570,6 +571,7 @@ void rcc_clock_setup_in_hsi_out_48mhz(void)
|
||||
rcc_set_hpre(RCC_CFGR_HPRE_NODIV);
|
||||
rcc_set_ppre(RCC_CFGR_PPRE_NODIV);
|
||||
|
||||
flash_prefetch_buffer_enable();
|
||||
flash_set_ws(FLASH_ACR_LATENCY_024_048MHZ);
|
||||
|
||||
/* 8MHz * 12 / 2 = 48MHz */
|
||||
@ -595,6 +597,7 @@ void rcc_clock_setup_in_hsi48_out_48mhz(void)
|
||||
rcc_set_hpre(RCC_CFGR_HPRE_NODIV);
|
||||
rcc_set_ppre(RCC_CFGR_PPRE_NODIV);
|
||||
|
||||
flash_prefetch_buffer_enable();
|
||||
flash_set_ws(FLASH_ACR_LATENCY_024_048MHZ);
|
||||
|
||||
rcc_set_sysclk_source(RCC_HSI48);
|
||||
|
Loading…
x
Reference in New Issue
Block a user