Hi,
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?
/John
Hello John,
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.
HTH,
MJW
Hi,
and where do I find the excpetion stack frame?
/John
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.