Sorry this is a SAMS70 chip related question. But this may have an equivalent in AVR.
I have this interrupt code in Atmel Studio:
This interrupt is called when any bit in the PIO_ISR register is set. If i put a breakpoint on the zcross() line and I examine InterruptFlags, it is always 0. However, if I wave my cursor over portabase and scroll down to PIO_ISR, then that register shows it contains 0x00000001 which is correct. If I wave my cursor over PIO_ISR itself it says "PIO_ISR could not evaluate". In addition PIO_ISR is suppose to be cleared to all 0 whenever it is read.
Does anyone have a clue as to what is going on? Thanks.