MC9212XEQ512 - illegal op code interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9212XEQ512 - illegal op code interrupt

852 Views
JohnBarber
Contributor II

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

Labels (1)
0 Kudos
3 Replies

402 Views
MJW
NXP Employee
NXP Employee

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

0 Kudos

402 Views
JohnBarber
Contributor II

Hi,

and where do I find the excpetion stack frame?

/John

0 Kudos

402 Views
kef
Specialist I

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.

0 Kudos