stm32/rcc: wait for mux switch.
This commit is contained in:
parent
7ce3b19389
commit
361fde35cf
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user