Stampede
A vibration sensor on PA0 generates rapid pulse bursts. Your EXTI0 ISR must log each rising edge into a shared buffer, incrementing a sequence counter. After the burst completes, the main loop outputs a summary via UART: the total event count and the sum of buffered sequence numbers.
Expected UART output format: EVENTS:<count>\n SUM:<sum>\n
The buffer holds up to 8 entries. If more than 8 events arrive, keep counting but stop writing to the buffer. SUM is the sum of what's actually stored (at most 8 entries).
Example: 3 events → buffer = [1,2,3], EVENTS:3, SUM:6 Example: 12 events → buffer = [1,2,...,8], EVENTS:12, SUM:36
The starter code compiles without warnings but produces incorrect output. Find and fix all the bugs.