Kennel

Watchdog Never Resets Hung Board Debug

Symptom

The sensor's data-ready line went quiet mid-run. The board froze and the watchdog never bit. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: the sensor's data-ready output drives PA0 on the STM32F4, USART1 sends the readings out on PA9 to the host serial console with a TP1 capture on the net, and the independent watchdog inside the chip can reset the CPU

Pass condition

Each rising edge on PA0 prints SAMPLE:<n>, from 1. The watchdog is fed about every 10 ms while readings keep being logged, and never once they stop.

Expected behaviour over the first 100 ms: with the sensor answering, nine rising edges on PA0 print SAMPLE 1 to 9 and the watchdog is fed about every 10 ms, once per reading; with the sensor going quiet after two edges, SAMPLE 1 and 2 print and the watchdog is fed no more after the last reading

Notes

The sensor pulses PA0 once per reading until it goes quiet. Runs last 100 ms, under the watchdog's 1 s. The kernel configuration is fixed.

Related challenges

Loading the interactive arena.