hard fault error

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

hard fault error

1,451 Views
xiabin
Contributor II

 I  use  S32K144 MCU.  The program runs for a few minute and triggers hardfault.

I USE fualt_exceptions.c/.h  to to find the problem.  track the PC pointer and stack address of the problem.

stack address is 0x20006f8a,is right。

Track the PC, fault occurs when entering various interrupts(ADC, LPTR, UART  etc),The asm is  push {r3, lr} as shown in the figure.

What's the reason for this program ? 

xiabin_0-1641268504794.png

 

 

 

 

 

Tags (1)
0 Kudos
Reply
3 Replies

1,440 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @xiabin,

What kind of exception is it? Bus fault, Usage fault?

What do you read in CFSR?

Can you share the project so that I can test it?

 

BR, Daniel

0 Kudos
Reply

1,412 Views
xiabin
Contributor II

Sorry, I can't upload my project.
the CFSR = 0x00000100,
I have three boards, only one has this problem, I replaced the crystal oscillator, the probability of failure decreased, but still there.

0 Kudos
Reply

1,384 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @xiabin.

So it is IBUSERR.

danielmartynek_0-1641896825690.png

Since it is detected after fetching the vector table, can you please double check the vectors?

 

BR, Daniel

 

0 Kudos
Reply