From 1e029a9e66f0a9621c2911e4147bb7a838190577 Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 17 May 2023 03:21:07 +0200 Subject: [PATCH] rp/clocks: remove superfluous clock actions the rtc doesn't have to be disabled since it's always clocked from ref, and the watchdog doesn't need to be configured twice. --- embassy-rp/src/clocks.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index 7ab0ecd1..c7043669 100644 --- a/embassy-rp/src/clocks.rs +++ b/embassy-rp/src/clocks.rs @@ -351,11 +351,6 @@ pub(crate) unsafe fn init(config: ClockConfig) { let (xosc_freq, pll_sys_freq, pll_usb_freq) = match config.xosc { Some(config) => { - pac::WATCHDOG.tick().write(|w| { - w.set_cycles((config.hz / 1_000_000) as u16); - w.set_enable(true); - }); - // start XOSC // datasheet mentions support for clock inputs into XIN, but doesn't go into // how this is achieved. pico-sdk doesn't support this at all. @@ -510,9 +505,6 @@ pub(crate) unsafe fn init(config: ClockConfig) { } if let Some(conf) = config.rtc_clk { - c.clk_rtc_ctrl().modify(|w| { - w.set_enable(false); - }); c.clk_rtc_div().write(|w| { w.set_int(conf.div_int); w.set_frac(conf.div_frac);