stm32/rcc: wait for mux switch.

This commit is contained in:
Dario Nieuwenhuis 2023-10-18 03:16:15 +02:00
parent 7ce3b19389
commit 361fde35cf

View File

@ -241,6 +241,7 @@ pub(crate) unsafe fn init(config: Config) {
w.set_ppre1(config.apb1_pre); w.set_ppre1(config.apb1_pre);
w.set_ppre2(config.apb2_pre); w.set_ppre2(config.apb2_pre);
}); });
while RCC.cfgr().read().sws() != config.mux {}
let ahb_freq = sys_clk / config.ahb_pre; let ahb_freq = sys_clk / config.ahb_pre;