s32k3 has a usage fault caused by startup

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

s32k3 has a usage fault caused by startup

1,062 Views
sun15021414801
Contributor II

development environment:

S32K344 + GHS compiler +ETAS Autosar + Trace 32

The problem is expressed as:

1.The software runs when mcu is debugged using lauterbach emulator

2.When the emulator is disconnected and the mcu is powered on, a hard fault occurs

3.After a hard fault occurs, attach to the MCU by emulator and view the registers of the mcu as shown below

sun15021414801_0-1683865462525.png

The code already has a hard fault when it runs the _start function in the startup_xxx.s file

sun15021414801_1-1683866190698.png

 

 

Some experience that has been tried:

1.Using the mcal code in RTD for debugging  ,compiler with GCC, no problems were encountered

 

 

0 Kudos
Reply
2 Replies

1,035 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @sun15021414801,

Since you use ETAS Autosar, and it works with the S32DS RTD, I would recommend contacting ETAS.

 

The debugger typically disables the WDOG, initializes SRAM ECC, etc.

 

Do you know at with instruction in the startup code the fault is detected?

You should find the address on the Stack from the HardFault handler.

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

https://community.nxp.com/t5/S32K-Knowledge-Base/How-To-Debug-A-Fault-Exception-On-ARM-Cortex-M-V7M-...

 

These are possible root causes of this fault:

Loading a branch target address to PC with LSB=0.
Stacked PSR corrupted during exception or interrupt handling.
Vector table contains a vector address with LSB=0.

Can you check the vector table in the memory view?

 

BR, Daniel

0 Kudos
Reply

752 Views
ryan_sun
Contributor I

Hi @sun15021414801 

I face the same issue, do you fix the issue?

0 Kudos
Reply