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.
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
解決済! 解決策の投稿を見る。
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?
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.
Hi @kyf
From what I understood, this problem started when the optimization was changed. Am I correct?
@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.
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?
@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
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
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?
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