Vigil
STM32 Heartbeat Timeout Monitor Exercise
Task
U2 is the board next door. While alive, it pulses PA0 high on a steady beat. Watch that heartbeat with TIM3's count for as long as the board runs. The registers and bit fields are on the Datasheet tab.
Circuit
Pass condition
No heartbeat for 4 ms -> print LOST (not before 3.8 ms, by 4.2 ms). One arrives after LOST -> print BACK; otherwise -> print nothing.
Notes
The given code sets up USART1 and printing, and starts TIM3 at 4 MHz. Your program is built and run at -O0, then at -O2. Both must pass.