From 2f2860b09697845029b4827462fdf98b515e8898 Mon Sep 17 00:00:00 2001 From: pennae Date: Sat, 13 May 2023 18:45:40 +0200 Subject: [PATCH] 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. --- embassy-rp/src/clocks.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index 0972cb21..d3408271 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) { assert!(config.post_div2 <= config.post_div1); 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 let mut peris = reset::Peripherals(0); match p {