Random Hard Faults

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

Random Hard Faults

990 Views
ashesman
Contributor III

Hi,

I have a very frustrating and odd issue.  Since I have been using the Kinetis K22F dev kit with onboard open SDA debugger (changed to PE code) I have been getting some strange behavior.  Every now and then the micro has a hard fault for no obvious reason.  Most of the time when it happens doing a remove all break points seems to solve the problem.

Anybody know how to prevent this.  Usually happens when you edit code and it loses track of correct break point locations.

Regards

Ashley

0 Kudos
9 Replies

783 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Could you provide more detailed info about the issue?

Which IDE software you are using? KDS software or CodeWarrior software?

Which Evaluation board you are using?

For you are using Processor Expert tool, which component you are using?

If it is possible, could you provide your project software?

Then we could check on site. Thank you for the attention.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

783 Views
ashesman
Contributor III

Hi,

I am using KDS (latest downloaded a few weeks ago).  I am using SDK 2.0 built from the website.  The board I have is a Freedom K22F.  I am using the PNE debugger option.  I could not get the board to debug at all and read on some forums that these boards did not work correctly out of the box and needed changing to the PNE debugger firmware.

I get this problem on any project.  It happens if you debug, place some break points, edit the code so the lines the breakpoints were on are affected.  Sometimes the debugger will not launch at all.  Removing all breakpoints often fixes it.  Sometimes it needs to be unplugged and plugged back in.  Usually it will just randomly end up at the hardfault handler.  Doing a remove all breakpoints and restarting the debug session always fixes it if that happens.

Not using processor expert at all.

Thanks

0 Kudos

783 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Could you try to update the FRDM-K22F board OpenSDA firmware with Segger J-Link?

You could find the FRDM-K22F OpenSDA version is V2.1. You can download related J-Link firmware from below link:

SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2 


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

783 Views
ashesman
Contributor III

Thanks for your advice.  I have just downloaded and tried and Segger JLink Open SDA firmware for Freedom K22F board.  It installed and worked wel first go.  Much faster to load code and step than the PNE one.  But if you step while in a single line while loop it gets tangled up in a mess and starts scrolling text in the console window and that is the end of.  Also it seems to hang and freeze with various message son the screen that will not go away for about a minute.  Now it will not start debugging at all.

So, it is better when it works, but very unreliable.  At least the PNE one would always go after a clear all breakpoints.

It is a shame as it was nice being faster...

0 Kudos

783 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

I also do a test with KDS IDE software & FRDM-K22F board (using Segger J-Link firmware) & KSDK V2.0 software.

While, I don't find you mentioned issue.

Which demo you are debugging with? I will try that demo on my site. Thanks.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

783 Views
ashesman
Contributor III

Mostly I have been using the ADC low power example from SDK 2.0 for Freedom K22F.  Try starting stopping, pausing , stepping, adding break points, change code during debugging.  stop, restart etc.  Give it a bit of a workout.  It wasn't too bad yesterday.  Only failed about twenty times!

Cheers

Ashley

0 Kudos

783 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Thank you for the patience.

I had tested you mentioned most situations, there without abnormal behavior.

For, I check you also "change code during debugging", If so, you need to rebuild the project and after that, re-program & debug the modified code again. 


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

783 Views
ashesman
Contributor III

Hi,

Thanks for looking into this.  I eventually gave up on the PNE tool with a series of swear words!  I have been using the segger firmware and having much better luck.  Still crashes ocassionaly but can just end the debugger task in task manager and it is OK.

Thanks again

Ashley

0 Kudos

783 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Ashley,

Sorry for the later reply.

I was on vacation this week and will be back to office at Oct. 8th. I will test on my site when I am back to office.

Thank you for the patience. Sorry for that may bring any inconvenience to you.

best regards,

Ma Hui

0 Kudos