Trying to get a interrupt to run on timer overflow but despite all registers seemingly being set correctly i never enter the ISR.
Here is the register setup from the timer 2
As can be seen it is enabled, it is counting, CCMP is set to the desired 0xFF4F, interrupt is not masked and the interrupt flag gets raised on compare match.
Global interrupts are enabled via the sei() function and can be seen by the debugger.
I have a breakpoint in the ISR that is never reached and if it did the flag gets reset when entering the ISR as a precaution.
ISR(TCB2_INT_vect) { COUNTER_SEC_TIMER.INTFLAGS |= TCB_CAPT_bm; //Clear interrupt flag subSecCnt++; }
Its probably me missing something completely mundane but at this point i dont know what else to check.