Steady
A mechanical push-button on PA0 fires noisy transitions when pressed or released. Your firmware must debounce the input and report only genuine state changes over UART.
Real buttons bounce: a single press can produce several rapid transitions before settling, and electrical noise can produce brief spurious pulses that are not presses at all. A correct filter accepts a new level only after it has held steady for at least 20ms, and ignores anything shorter.
A free-running 1us timer (TIM2) is already configured in the starter, so elapsed time is available by reading TIM2_CNT. Use it to measure the 20ms window.
When a debounced press is detected, print "PRESS\n". When a debounced release is detected, print "RELEASE\n".
Example: the button bounces high/low/high then settles high for longer than 20ms -> print exactly one "PRESS". A 4ms spurious pulse that settles back low -> print nothing, because no press ever completed.