Deep Freeze

You inherited a battery-powered sensor node that's supposed to enter STM32 stop mode between readings to conserve power, then wake on a GPIO event and report status over UART. The previous developer got the basic structure right but the node never actually enters deep sleep, and when it does manage to wake, the UART output is garbled or silent.

The firmware should:

  • Print "SLEEP" over UART, then enter stop mode
  • Wake when PA0 goes high (external wakeup signal)
  • After waking, print "AWAKE" over UART

Expected output: SLEEP AWAKE

The code compiles cleanly but the power draw never drops and post-wake UART is dead. Find and fix all the bugs.

Loading the interactive arena.