Frequent hardfault on startup

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

Frequent hardfault on startup

Jump to solution
1,280 Views
Daan
Contributor III

Hello,

 

On an RT1064 I run a FreeRTOS based project. Quite frequent the application will not startup from the debugger because of a hardfault, if I reflash the application, it works properly (I didn't change the application nor do I need to recompile it). If I inspect the call stack, it is very random where the error originated, it can be USB, ethernet, File system, but it's always some FreeRTOS sourcefile, but I assume the FreeRTOS sources are quite well debugged.

Now and then I notice that there is no call stack at all, it just stops at an interrupt.

I work with SDK 2.10.0.

Any ideas?

0 Kudos
Reply
1 Solution
1,191 Views
Daan
Contributor III

Thanks for the reply.

I switched to the Segger driver for the debugger, this resolved my problem, I don't get the hardfaults on power-up any more.

Regards,

Danny

View solution in original post

0 Kudos
Reply
5 Replies
1,101 Views
Daan
Contributor III

It seems that the hardfaults are caused by an incorrectly written flash, as mentioned before, I need to reflash the application, if I then inspect the console output, I noticed that 1 sector (of 12) is rewritten, that's odd, since the code has not changed. Is there some way to verify the flash during or after programming?

0 Kudos
Reply
1,192 Views
Daan
Contributor III

Thanks for the reply.

I switched to the Segger driver for the debugger, this resolved my problem, I don't get the hardfaults on power-up any more.

Regards,

Danny

0 Kudos
Reply
1,264 Views
Daan
Contributor III

Okay thank you, I'll install the latest SDK.

Regards,

Daan

0 Kudos
Reply
1,265 Views
Daan
Contributor III

Okay thank you, I'll install the latest SDK.

0 Kudos
Reply
1,267 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Daan,

The random nature of the issue that you are describing makes it difficult to pinpoint the error to something specific. However, many bug fixes come with each release of our SDKs, so the first recommendation would definitely be to update the SDK to the latest release (2.12.0 as of now). Let me know if the problem persists after this.

 

BR,

Edwin.

0 Kudos
Reply