AnsweredAssumed Answered

How to fix the hardfault error that occurs after debugging the code into the board ?

Question asked by Ganesh Ramachandran on May 22, 2016
Latest reply on May 23, 2016 by Ganesh Ramachandran


As shown in the screenshot above. I am getting this hardfault problem when I try to debug the UART Boot loader code -AN4767 (whose features I slightly modified according to the Board and the Controller I am using) on a custom board fitted with MKE02Z64VLD2. I am using Docklight v2.1 for serial communication.

The Problem Is,

I debug the code. It debugs fine.

Then I press the resume button in the Kinetis Design Studio IDE (Version 2). No problem occurs.

I open the Docklight and send some characters like this,

Docklightfor nxp.jpg

For the first time when I send FC 49 am receiving the character FF back. But when I try to send a character for the second or third or nth time. I am ending up with this Hardfault.

Then I re-debug the code, I send a character again, I am receiving a character back, but again when i try to send it the second (or any number of times) like previous attempts I am ending up with HardFault.

How to fix this ?