stm32/rcc: some f3 fixes.
This commit is contained in:
parent
e8c998aad8
commit
739c69bd63
1 changed files with 3 additions and 2 deletions
|
@ -222,8 +222,8 @@ pub(crate) unsafe fn init(config: Config) {
|
||||||
// Set prescalers
|
// Set prescalers
|
||||||
// CFGR has been written before (PLL, PLL48) don't overwrite these settings
|
// CFGR has been written before (PLL, PLL48) don't overwrite these settings
|
||||||
RCC.cfgr().modify(|w| {
|
RCC.cfgr().modify(|w| {
|
||||||
w.set_ppre2(config.apb1_pre);
|
w.set_ppre1(config.apb1_pre);
|
||||||
w.set_ppre1(config.apb2_pre);
|
w.set_ppre2(config.apb2_pre);
|
||||||
w.set_hpre(config.ahb_pre);
|
w.set_hpre(config.ahb_pre);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -234,6 +234,7 @@ pub(crate) unsafe fn init(config: Config) {
|
||||||
|
|
||||||
// CFGR has been written before (PLL, PLL48, clock divider) don't overwrite these settings
|
// CFGR has been written before (PLL, PLL48, clock divider) don't overwrite these settings
|
||||||
RCC.cfgr().modify(|w| w.set_sw(config.sys));
|
RCC.cfgr().modify(|w| w.set_sw(config.sys));
|
||||||
|
while RCC.cfgr().read().sws() != config.sys {}
|
||||||
|
|
||||||
let rtc = config.ls.init();
|
let rtc = config.ls.init();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue