Skip to content

Commit

Permalink
fix: enable RP2350 watchdog tick generator
Browse files Browse the repository at this point in the history
  • Loading branch information
wowkster committed Jan 15, 2025
1 parent 169f9c2 commit 617f6e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion embassy-rp/src/clocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,13 @@ pub(crate) unsafe fn init(config: ClockConfig) {
// Configure tick generator on the 2350
#[cfg(feature = "_rp235x")]
{
pac::TICKS.timer0_cycles().write(|w| w.0 = clk_ref_freq / 1_000_000);
let cycle_count = clk_ref_freq / 1_000_000;

pac::TICKS.timer0_cycles().write(|w| w.0 = cycle_count);
pac::TICKS.timer0_ctrl().write(|w| w.set_enable(true));

pac::TICKS.watchdog_cycles().write(|w| w.0 = cycle_count);
pac::TICKS.watchdog_ctrl().write(|w| w.set_enable(true));
}

let (sys_src, sys_aux, clk_sys_freq) = {
Expand Down

0 comments on commit 617f6e7

Please sign in to comment.