How to detect illegal opcode in S32K1XX

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

How to detect illegal opcode in S32K1XX

跳至解决方案
1,972 次查看
Pratheek
Contributor I

How to detect ECU reset due to Illegal op code/undefined instructions. I think Usage fault exception will trigger if illegal opcode is executed. But, how to confirm the Usage fault exception is due to illgale opcode?

0 项奖励
回复
1 解答
1,959 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Pratheek,

Yes, this is a usage fault exception.

In the fault handler, read the CFSR[UNDEFINSTR] register.

danielmartynek_0-1666254694141.png

 

Since the CM7 core is very similar to the CM4 on S32K14x in this regard, you can refer to this document/example:

https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447

 

Regards,

Daniel

 

在原帖中查看解决方案

2 回复数
1,960 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Pratheek,

Yes, this is a usage fault exception.

In the fault handler, read the CFSR[UNDEFINSTR] register.

danielmartynek_0-1666254694141.png

 

Since the CM7 core is very similar to the CM4 on S32K14x in this regard, you can refer to this document/example:

https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447

 

Regards,

Daniel

 

1,932 次查看
Pratheek
Contributor I

Hello Daniel,

 

Thank you veru much for your support, issue solved.

 

Thanks & Regards,

Pratheek 

 

 

0 项奖励
回复