I'm using a MC9s12XEQ512 and get a illegal op code interrupt.
Can I in some way figure out where in the code the processor was executing when the interrupt occured?
Is the pc register stored in a register or so?
the exception stack-frame contains the return-address field. The return-address for an illegal op-code exception is basically the PC of the illegal op-code + 2.
and where do I find the excpetion stack frame?
In CPU12X reference manual see TRAP instruction description.
Like on entry into any interrupt handler, CPU return address RA can be found at SP+6. Illegal instruction is at RA-2.
Retrieving data ...