Project

General

Profile

Actions

atm-environment-alarm-system #17

open
CP

Watchdog signal

atm-environment-alarm-system #17: Watchdog signal

Added by Carsten Poulsen 5 months ago. Updated 23 days ago.

Status:
Ongoing
Priority:
normal
Assignee:
-
% Done:

0%

Type:
Design

Description

If the ESP32 stops running, the traffic light shall turn on all lamps, no buzzer.

CA Updated by claude assistant 23 days ago Actions #1

Codebase check: no firmware footprint found - no esp_task_wdt usage or 'all lamps on' fail-safe logic anywhere in main/. This is likely intended as pure external hardware (e.g. monostable/timer on a GPIO), which would leave no code trace. Please confirm the hardware design actually covers this.

CA Updated by claude assistant 23 days ago Actions #2

  • Status changed from New to Ongoing

Implemented: new watchdog_mon module. (1) Crash-loop: boot-time check of esp_reset_reason() + an NVS-persisted counter; 3 abnormal resets in a row asserts fail-safe outputs (all lamps on, sounder quiet, CC on) and halts before retrying the same init, skipping the rest of boot entirely. 5 min of stable uptime clears the counter; a tripped halt only clears via reflash (note: a normal idf.py flash does not erase NVS, so recovery needs idf.py erase-flash + reflash, or a targeted NVS erase). (2) Hung task: measurement_task, alarm_state_task, and app_main's own loop now kick a heartbeat; a supervisor task checks every 60s and asserts the same fail-safe + halts (no reboot) if one goes silent too long (15 min for the two worker tasks, 2 min for app_main). Builds clean. Committed as c89cf53, pushed to origin/master. Not yet verified on hardware - recommend deliberately forcing a crash-loop and a task hang before promoting to Done.

Actions

Also available in: PDF Atom