the original code, not this debug version, has the overflow vector ISR defined --in fact, just like you wrote it since I didn't know how I wanted to handle it yet. It resets similarly -- but perhaps for a different reason.
I will try it on the debug version to see if that makes it run without resets...
Thank you!
Instead of the empty vector or with the use of return, use instead
EMPTY_INTERRUPT(TIMER1_OVF_vect);
Alternatively, you can make an active overflow vector and increment an overflow count, which is what you will do if you actually use the overflow vector.
If an unexpected interrupt occurs (interrupt is enabled and no handler is installed,
which usually indicates a bug), then the default action is to reset the device by
jumping to the reset vector.
Yes, if the interrupt is enabled/triggered and there is no interrupt vector, the program jumps to the NULL vector which is at memory address 0 and is the reset vector for the avr platforms.
I found the issue on Sunday. I misunderstood the datasheet and was enabling the comparator interrupt as well, when what I wanted was just to enable the Analog Comparator Input Capture (ACIC bit on ACSR). It was jumping to the (undefined) comparator interrupt vector.