TCA0 interrupt is not vectored to my ISR-function.
I have a Start-atmel generated project with only one software component, a TCA0 counter set up in normal mode to yield a periodic overflow interrupt. However, TCA0 overflow interrupts never hit my vector7 function and are instead catched by a bad vector interrupt function.
What I know:
A __vector_default function catches the interrupts. In this function I clear the TCA0 OVF flag bit and toggle an LED. The LED then flips as expected at the programmed timer interval.
If the __vector_default function only has en endless loop the background program stops.
To find the interrupt source I set the CPUINT.LVL1VEC for vector 1 and upwards and checked the CPUINT.STATUS register. In all cases only the LVL0EX bit was set. Until I reached vector 7 which set the LVL1EX bit. This indicates that it is actually vector 7 which is in action. It also shows that I have not activated the compact vector table option.
So I'm confident that the bad interrupt is caused by TCA0 overflow..
Here is the beginning of the disassembled code, looks like the vector_7 is at the location stated in the data sheet (word address 0x0e).
00000000 <__vectors>: 0: 0c 94 74 00 jmp 0xe8 ; 0xe8 <__ctors_end> 4: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt> 8: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt> c: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt> 10: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt> 14: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt> 18: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt> 1c: 0c 94 f3 00 jmp 0x1e6 ; 0x1e6 <__vector_7> 20: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt> 24: 0c 94 7e 00 jmp 0xfc ; 0xfc <__bad_interrupt>
and 0x1e6 is actually the address of my vectror7 handler:
000001e6 <__vector_7>: 1e6: 1f 92 push r1 (...)
Any idea about what I'm doing wrong?