mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 14:53:03 +00:00
stm32f1: Keep flash prefetch enabled
This commit is contained in:
parent
7fd868ade9
commit
e7aeb9b29f
@ -102,7 +102,6 @@ pub(crate) unsafe fn init(config: Config) {
|
||||
|
||||
assert!(pclk2 <= 72_000_000);
|
||||
|
||||
// Only needed for stm32f103?
|
||||
FLASH.acr().write(|w| {
|
||||
w.set_latency(if real_sysclk <= 24_000_000 {
|
||||
Latency::WS0
|
||||
@ -111,6 +110,8 @@ pub(crate) unsafe fn init(config: Config) {
|
||||
} else {
|
||||
Latency::WS2
|
||||
});
|
||||
// the prefetch buffer is enabled by default, let's keep it enabled
|
||||
w.set_prftbe(true);
|
||||
});
|
||||
|
||||
// the USB clock is only valid if an external crystal is used, the PLL is enabled, and the
|
||||
|
Loading…
Reference in New Issue
Block a user