MC9212XEQ512 - illegal op code interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MC9212XEQ512 - illegal op code interrupt

1,164 次查看
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

标签 (1)
0 项奖励
回复
3 回复数

714 次查看
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 项奖励
回复

714 次查看
JohnBarber
Contributor II

Hi,

and where do I find the excpetion stack frame?

/John

0 项奖励
回复

714 次查看
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 项奖励
回复