rp/clocks: always reconfigure pll
this is only really useful for runtime *re*configuration, which we don't currently support. even runtime reconfig probably won't need it, unless we keep taking the sledgehammer approach of reconfiguring everything all the time.
This commit is contained in:
parent
e1e87fef25
commit
2f2860b096
1 changed files with 0 additions and 12 deletions
|
@ -587,18 +587,6 @@ unsafe fn configure_pll(p: pac::pll::Pll, input_freq: u32, config: PllConfig) {
|
||||||
assert!(config.post_div2 <= config.post_div1);
|
assert!(config.post_div2 <= config.post_div1);
|
||||||
assert!(ref_freq <= (config.vco_freq / 16));
|
assert!(ref_freq <= (config.vco_freq / 16));
|
||||||
|
|
||||||
// do not disrupt PLL that is already correctly configured and operating
|
|
||||||
let cs = p.cs().read();
|
|
||||||
let prim = p.prim().read();
|
|
||||||
if cs.lock()
|
|
||||||
&& cs.refdiv() == config.refdiv as u8
|
|
||||||
&& p.fbdiv_int().read().fbdiv_int() == fbdiv as u16
|
|
||||||
&& prim.postdiv1() == config.post_div1
|
|
||||||
&& prim.postdiv2() == config.post_div2
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset it
|
// Reset it
|
||||||
let mut peris = reset::Peripherals(0);
|
let mut peris = reset::Peripherals(0);
|
||||||
match p {
|
match p {
|
||||||
|
|
Loading…
Reference in a new issue