Why this is happening ? Hard fault error at Clock_Ip_InitClock() function

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

Why this is happening ? Hard fault error at Clock_Ip_InitClock() function

ソリューションへジャンプ
3,925件の閲覧回数
kyf
Contributor V

Hello NXP team.

 

I'm getting hard fault error at Clock_Ip_InitClock() function. If I recompile the code with different optimization this may go away and if I change the code for example add a new variable or something insignificant the hardfault error may not happen again.

 

kyf_0-1674575634473.png

 

I get interrupted many times while debugging other code and I can't find the reason why this is happening.

 

Have you ever had any similar report ?
Can I do anything to find out the real reason for the hard fault error?

 

Kind regards,

kyf

 

0 件の賞賛
返信
1 解決策
3,777件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @kyf 

I could not replicate your problem using Clock_Ip_Example and all optimization levels.To be in the same context, could you try that example?

It would also help me to know what optimization level you are using. And also, have you tested in different EVBs?

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
3,809件の閲覧回数
kyf
Contributor V

Hello @VaneB .

I've attached the clocks in this reply. I don't want to claim that I've replicated this with examples code because I don't have any example code to share with you regarding this issue. But i remember having the same error with example code (with slightly mods). The issue there was that I had changed optimization level and the same issue occurred.

Kind regards,

kyf.

0 件の賞賛
返信
3,796件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @kyf 

From what I understood, this problem started when the optimization was changed. Am I correct?

0 件の賞賛
返信
3,783件の閲覧回数
kyf
Contributor V

@VaneB  Yes, this happens only after optimization level change. I have tried many times to delete the build folder and rebuild from scratch but the error keeps popping up. Unless I add any code to my project it does not disappear.

0 件の賞賛
返信
3,778件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @kyf 

I could not replicate your problem using Clock_Ip_Example and all optimization levels.To be in the same context, could you try that example?

It would also help me to know what optimization level you are using. And also, have you tested in different EVBs?

0 件の賞賛
返信
3,753件の閲覧回数
kyf
Contributor V

@VaneBthank you for your efforts.

Sadly, I can not share the project that I'm working and I haven't stored any copy of a project that I had this issue. If the same happens again I will store the project and all it's settings in order to sent it to you for testing.

Kind regards,

kyf

0 件の賞賛
返信
3,845件の閲覧回数
kyf
Contributor V

Hello @VaneB, thank you for replying to my request.

 

I'm using S32K344 with RTD v2.0. I'm working my project at the moment with the S32K3x4EVBQ172 devboard.

I've noticed last time that I've got this error, just only by adding some extra lines of code for example some nop instructions the error did ceased to occur.

 

1. Can you guide me in order to narrow down the cause of this issue ?

If you need any extra information from my side please let me know.

 

 

Kind regards,

kyf

0 件の賞賛
返信
3,820件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @kyf 

Could you help me by sharing the settings you made to the clocks?
Does this error happen to you in any of the examples provided with the RTD?

0 件の賞賛
返信
3,913件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @kyf 

When executing the code examples, do you get the hard fault error in the Clock_Ip_InitClock() function or is this only presented in your code?

Also, can you tell us the MCU that you are using? And also, which software?

 

B.R.

VaneB

0 件の賞賛
返信