Hi MJ,
To avoid being stuck or unwanted Reset, it's good practise to declare ALL interrupt vectors and have a proper function handling them.
You could have a generic function like:
Code:#pragma TRAP_PROCvoid _dummyISR( void ){ ErrorCode = 1;}
That function would just report it to your system.
Or you consider having an unexpected interrupt is serious and therefore do something like:
Code:#pragma TRAP_PROCvoid _dummyISR( void ){ /* endless cycle */ for(;;){ }}
If the COP is activated, it will generate a Reset.
By analyzing the stack when you stop the execution, you will be able to see the Return address.
This return address will tell you when the ISR was called and could help you find the source.
If you put a different function for each ISR (even if do the same thing), you will be able to get which interrupt occured by looking at the address of the current ISR being executed.
Hope this will help,
Cheers,
Alban.