hard fault error

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

hard fault error

3,842 次查看
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

 

 

 

 

 

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

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

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

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