Skip to content

Not that suitable question about register #819

Closed Answered by burrbull
schrodinger1772 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't know answer. Only tried to rewrite in terms of PAC.

let rcc = &(*RCC::ptr());
while {
    let cr = rcc.cr().read();
    !(cr.pllrdy().bit_is_set() && cr.hserdy().bit_is_set())
} { }
let mut cr_value = rcc.cr().read().bits();
defmt::println!("afterloop value: {:b}", cr_value);
rcc.cfgr().modify(|r, w| {
    // w.rtcpre().bits(8);
    // w.ppre2().div1();
    w.ppre1().div2();
    w.sw().pll();
    w.hpre().div1()
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@schrodinger1772
Comment options

Answer selected by schrodinger1772
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants