From b8679c0cc85e5eb65bd996ee18deac4a952b1b10 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 6 Nov 2023 03:37:39 +0100 Subject: [PATCH] stm32/rcc: set highest VOS on some F4s with no overdrive. --- embassy-stm32/src/rcc/f4f7.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/embassy-stm32/src/rcc/f4f7.rs b/embassy-stm32/src/rcc/f4f7.rs index 2e4f9572..d507a6fd 100644 --- a/embassy-stm32/src/rcc/f4f7.rs +++ b/embassy-stm32/src/rcc/f4f7.rs @@ -113,6 +113,14 @@ pub(crate) unsafe fn init(config: Config) { while !PWR.csr1().read().odswrdy() {} } + #[cfg(any(stm32f401, stm32f410, stm32f411, stm32f412, stm32f413, stm32f423))] + { + use crate::pac::pwr::vals::Vos; + use crate::pac::PWR; + + PWR.cr1().modify(|w| w.set_vos(Vos::SCALE1)); + } + // Configure HSI let hsi = match config.hsi { false => {