Hibernation

STM32 Sleep Mode Wakeup Debug

Symptom

The node prints READY, then stays silent however many times PA0 rises. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: a 3V3 rail powers U1, an STM32F4, and U2, a motion sensor whose output drives PA0, with TP1, a logic analyzer, on that line; PA9 carries USART1 TX to J1, a serial console

Pass condition

READY prints, then AWAKE <n> for each rising edge on PA0, counting from 1. The core takes IRQ 6 for each edge and is awake for under 5% of the run.

Expected output for the two-wakeup case: PA0 rises at 20 ms, falls at 35 ms and rises again at 50 ms; the core takes IRQ 6 at each rise and is asleep for the rest of the 100 ms run; the serial console shows READY, AWAKE 1 and AWAKE 2

Notes

The motion sensor raises PA0 on each motion while the node runs. By design the handler only records each edge. Main sends the reports. Awake time counts retired instructions. A sleeping core retires none.

Related challenges

Loading the interactive arena.