diff options
| author | pennae <[email protected]> | 2023-05-13 18:45:40 +0200 |
|---|---|---|
| committer | pennae <[email protected]> | 2023-05-17 14:45:42 +0200 |
| commit | 2f2860b09697845029b4827462fdf98b515e8898 (patch) | |
| tree | 822fd84009e9acb748e0a4c354e3379a175816fb | |
| parent | e1e87fef25e4a8f3ac21bcb4a9cb9bf41ddfd0d2 (diff) | |
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.
| -rw-r--r-- | embassy-rp/src/clocks.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index 0972cb215..d34082716 100644 --- a/embassy-rp/src/clocks.rs +++ b/embassy-rp/src/clocks.rs | |||
| @@ -587,18 +587,6 @@ unsafe fn configure_pll(p: pac::pll::Pll, input_freq: u32, config: PllConfig) { | |||
| 587 | assert!(config.post_div2 <= config.post_div1); | 587 | assert!(config.post_div2 <= config.post_div1); |
| 588 | assert!(ref_freq <= (config.vco_freq / 16)); | 588 | assert!(ref_freq <= (config.vco_freq / 16)); |
| 589 | 589 | ||
| 590 | // do not disrupt PLL that is already correctly configured and operating | ||
| 591 | let cs = p.cs().read(); | ||
| 592 | let prim = p.prim().read(); | ||
| 593 | if cs.lock() | ||
| 594 | && cs.refdiv() == config.refdiv as u8 | ||
| 595 | && p.fbdiv_int().read().fbdiv_int() == fbdiv as u16 | ||
| 596 | && prim.postdiv1() == config.post_div1 | ||
| 597 | && prim.postdiv2() == config.post_div2 | ||
| 598 | { | ||
| 599 | return; | ||
| 600 | } | ||
| 601 | |||
| 602 | // Reset it | 590 | // Reset it |
| 603 | let mut peris = reset::Peripherals(0); | 591 | let mut peris = reset::Peripherals(0); |
| 604 | match p { | 592 | match p { |
