From 361fde35cf37e5c8171ab470449e85ad44da4e52 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Wed, 18 Oct 2023 03:16:15 +0200 Subject: [PATCH] stm32/rcc: wait for mux switch. --- embassy-stm32/src/rcc/l4l5.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/embassy-stm32/src/rcc/l4l5.rs b/embassy-stm32/src/rcc/l4l5.rs index a10169d6..683b47c0 100644 --- a/embassy-stm32/src/rcc/l4l5.rs +++ b/embassy-stm32/src/rcc/l4l5.rs @@ -241,6 +241,7 @@ pub(crate) unsafe fn init(config: Config) { w.set_ppre1(config.apb1_pre); w.set_ppre2(config.apb2_pre); }); + while RCC.cfgr().read().sws() != config.mux {} let ahb_freq = sys_clk / config.ahb_pre;