My code works fine for sometime and after that, the system gets a reset and Program counter is set to 0x0000. I have put a break point at 0x0000 and the program execution hits it invariably. When PC goes to 0x0000, I took a look at the stack and the stack did not over flow. I am using the IAR debugger.
I do wake up the system from LPM4, then turn on XT2, and then go about doing my stuff. The OFIFG flag is always set when the PC goes to 0. I did not have the NMI vector defined. So in order to test that, I wrote an NMI for OFIFG, with the NMI handler clearing the OFIFG flag. That code seems to work.
How is this possible? Is something else the issue and not the OFIFG flag? Has someone experienced resets because of XT2 not settling?
Thanks