How to detect illegal opcode in S32K1XX

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

How to detect illegal opcode in S32K1XX

Jump to solution
1,980 Views
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 Kudos
Reply
1 Solution
1,967 Views
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

 

View solution in original post

2 Replies
1,968 Views
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,940 Views
Pratheek
Contributor I

Hello Daniel,

 

Thank you veru much for your support, issue solved.

 

Thanks & Regards,

Pratheek 

 

 

0 Kudos
Reply