diff options
| -rw-r--r-- | embassy-stm32/src/rcc/f1.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/embassy-stm32/src/rcc/f1.rs b/embassy-stm32/src/rcc/f1.rs index b2ae56dbf..367c88324 100644 --- a/embassy-stm32/src/rcc/f1.rs +++ b/embassy-stm32/src/rcc/f1.rs | |||
| @@ -102,7 +102,6 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 102 | 102 | ||
| 103 | assert!(pclk2 <= 72_000_000); | 103 | assert!(pclk2 <= 72_000_000); |
| 104 | 104 | ||
| 105 | // Only needed for stm32f103? | ||
| 106 | FLASH.acr().write(|w| { | 105 | FLASH.acr().write(|w| { |
| 107 | w.set_latency(if real_sysclk <= 24_000_000 { | 106 | w.set_latency(if real_sysclk <= 24_000_000 { |
| 108 | Latency::WS0 | 107 | Latency::WS0 |
| @@ -111,6 +110,8 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 111 | } else { | 110 | } else { |
| 112 | Latency::WS2 | 111 | Latency::WS2 |
| 113 | }); | 112 | }); |
| 113 | // the prefetch buffer is enabled by default, let's keep it enabled | ||
| 114 | w.set_prftbe(true); | ||
| 114 | }); | 115 | }); |
| 115 | 116 | ||
| 116 | // the USB clock is only valid if an external crystal is used, the PLL is enabled, and the | 117 | // the USB clock is only valid if an external crystal is used, the PLL is enabled, and the |
