From da7511aec7a395070ce53c65b5f9dc24f2082541 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Sun, 7 Dec 2025 13:03:30 +0100 Subject: [PATCH] main: configure hardware watchdogs to be petted faster than they expire --- src/bin/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index f2a8471..a19ab39 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -80,7 +80,7 @@ async fn main(spawner: Spawner) { let safety_ui = SafetyUi::new(&mut safety_surfaces, garage.display.clone()); let mut wdt = timer0.wdt; - wdt.set_timeout(esp_hal::timer::timg::MwdtStage::Stage0, esp_hal::time::Duration::from_secs(3)); + wdt.set_timeout(esp_hal::timer::timg::MwdtStage::Stage0, esp_hal::time::Duration::from_secs(5)); let swi = SoftwareInterruptControl::new(peripherals.SW_INTERRUPT); let hi_exec = STATIC_HI_EXEC.init(InterruptExecutor::new(swi.software_interrupt0)); let hi_spawn = hi_exec.start(esp_hal::interrupt::Priority::max()); @@ -186,6 +186,6 @@ async fn wdt_task(mut wdt: Wdt>) { // Watchdog is set to trip after 5 seconds, so we wait just long enough before it trips // TODO: We should maybe extend this timeout to 30s or 1m when the system is sleeping wdt.feed(); - Timer::after_secs(5).await; + Timer::after_secs(3).await; } } \ No newline at end of file