We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cf05aa5 + 617f6e7 commit 1d8ef6fCopy full SHA for 1d8ef6f
embassy-rp/src/clocks.rs
@@ -524,8 +524,13 @@ pub(crate) unsafe fn init(config: ClockConfig) {
524
// Configure tick generator on the 2350
525
#[cfg(feature = "_rp235x")]
526
{
527
- pac::TICKS.timer0_cycles().write(|w| w.0 = clk_ref_freq / 1_000_000);
+ let cycle_count = clk_ref_freq / 1_000_000;
528
+
529
+ pac::TICKS.timer0_cycles().write(|w| w.0 = cycle_count);
530
pac::TICKS.timer0_ctrl().write(|w| w.set_enable(true));
531
532
+ pac::TICKS.watchdog_cycles().write(|w| w.0 = cycle_count);
533
+ pac::TICKS.watchdog_ctrl().write(|w| w.set_enable(true));
534
}
535
536
let (sys_src, sys_aux, clk_sys_freq) = {
0 commit comments