Hard Fault exception with CFSR all '0's

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Hard Fault exception with CFSR all '0's

ソリューションへジャンプ
1,923件の閲覧回数
ali_zein
Contributor I

Hello,

 

I am working on S32K144 and I get a hard fault exception with the following data:

 

HFSR -> Forced = 1

SHCSR -> 0x00070000

CFSR -> all '0's

 

Can you please help out how to identify the reason behind that hard fault or which other registers that can be helpful?

0 件の賞賛
返信
1 解決策
1,846件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ali_zein,

I'm able to reproduce this behavior by calling SVC instruction while the interrupts are blobaly masked (PRIMASK = 1).

Please make sure the interrupt are not masked.

 

Thank you,

BR, Daniel

 

元の投稿で解決策を見る

7 返答(返信)
1,894件の閲覧回数
ali_zein
Contributor I

Hello @chaitanya_kalyani 

After some debugging It looks like the HardFault exception happens just on executing the following instruction "svc #1" during the OS start

 

Do you have any suggestion where I can look next?

0 件の賞賛
返信
1,847件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ali_zein,

I'm able to reproduce this behavior by calling SVC instruction while the interrupts are blobaly masked (PRIMASK = 1).

Please make sure the interrupt are not masked.

 

Thank you,

BR, Daniel

 

1,806件の閲覧回数
ali_zein
Contributor I

Hello Daniel,

That's exactly was the problem, the interrupts where globally masked from the bootloader, and then the SVC exception was escalated to Hardfault.

Thanks a lot for your support (Y)

0 件の賞賛
返信
1,888件の閲覧回数
chaitanya_kalyani
Contributor III

Hello @ali_zein ,

Once can you check MCU part number is same as you have configured.

Like if you configured program for S32K144 but if you are using S32K142 then also you can get hard fault error.

 

0 件の賞賛
返信
1,900件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ali_zein,

You can use this example to find the instruction:

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

 

Regards,

Daniel

0 件の賞賛
返信
1,894件の閲覧回数
ali_zein
Contributor I

@danielmartynek 

 

Thanks a lot Daniel, 

I have checked that post previously, however I am not sure how to proceed as I find CFSR all 0s, so It's not really clear where to look..

0 件の賞賛
返信
1,911件の閲覧回数
chaitanya_kalyani
Contributor III

Hello @ali_zein,

 

Can you please check it below points

1. Check control is comin to main or not. If control coming to main then check from where it is entering to hard fault from call stack (might be some wrong initialization)

2. If control is not coming to main then please check for MCU that you have selected is correct or not.

 

I hope this will help you to solve your problem.

 

0 件の賞賛
返信