Report watchdog restarts and which loop step stalled
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- embedded-iot
Direzione di ricerca
Read src/utils/watchdog.cpp and src/hello_robot.cpp, especially run() and crash_report(), then compare how teensy4/CrashReport.cpp reads SRC_SRSR and how teensy4/imxrt.h defines its watchdog bit. Trace the main loop steps and watchdog callback; test on a bare Teensy with a temporary forced hang, removing it before opening a PR. Done means a watchdog restart logs its cause and last loop step, while normal power-on logs no watchdog message.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When the main loop stalls, the watchdog restarts the Teensy, but nothing tells us it was the watchdog or which part of the loop hung. See the TODO in src/utils/watchdog.cpp ("Read and print a flag to identify the cause of stall").
Good first task. Needs a bare Teensy, no robot.
Files
src/utils/watchdog.cpp,src/utils/watchdog.hppsrc/hello_robot.cpp(run()andcrash_report())teensy4/CrashReport.cpp(reference, readsSRC_SRSRaround line 160)teensy4/imxrt.h(SRC_SRSR_*bits)
Steps
- Our watchdog is
WDT_T4<WDT1>, which sets theSRC_SRSR_WDOG_RST_Bbit inSRC_SRSRon reset.CrashReport.breadcrumb(n, value)stores a value that survives a restart. - In
HelloRobot::run(), before each main step (sensors, controls, comms, ...), record a step number withCrashReport.breadcrumb(1, step). Use a small enum for the steps. - At boot, before
crash_report(), readSRC_SRSR. If the watchdog bit is set, log "Restarted by watchdog" and the last step viaSystemLog. - Don't clear
SRC_SRSRyourself;CrashReportreads it too. CheckCrashReport.cppbefore writing to the register. - Fill in the TODO in
watchdog_callback()by printing the current step there as well. - Test on a bare Teensy with a temporary forced hang (
while (true) {}inside one step). Remove it before opening the PR.
Done when
- After a forced hang, the next boot says the watchdog caused the restart and names the step.
- A normal power-on prints no watchdog message.
Related: #211 (safety asserts currently end in a watchdog reset).
- Lingua principale
- C
- Stelle
- 11
- Fork
- 2
- Merge medio
- 18g 3h
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CU-Robotics/firmware
-
good first issue not started
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
CU-Robotics/firmware#257 ·
-
Pre-flight checksApertain progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
CU-Robotics/firmware#222 ·
-
Fix existing clang-tidy findingsForse già presa @roccoagain l’ha presa oggi. Aperta
CU-Robotics/firmware#262 · 1 assegnatario ·
-
not started
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
CU-Robotics/firmware#258 ·
-
in progress software-in-the-loop
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
CU-Robotics/firmware#250 · 1 commento ·
Tutte le issue di CU-Robotics/firmware
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
schrodinger/pymol-open-source#532 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
facebookexperimental/hermit#347 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
CTSRD-CHERI/cheribsd#2769 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
valkey-io/valkey-proxy#45 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100