Resolved! STM32F0xx : Timer interrupt occasionally processed late or early? Glitch.
I am using a STM32F072 microcontroller with a matrix keypad. The matrix pins are essentially bit banged, using ODR mask commands. When I set up a timer(doesn't matter which one) and I use the timers interrupt (update and a single capture compare) to ...