This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC1788 - Degguger starts at HardFault_Handler

Hello,

I have a problem that I'm hoping someone might be able to give me pointers on how to debug.

I have the simplest firmware possible (blink and LED in a while(1) and this firmware works as expected on an EA development kit for the LPC1788.

I have a custom LPC1788 board and I can download the firmware to the board but when I start the debug session the PC goes straight to the HardFault_Handler.

If I manually change the PC to the Reset vector the firmware runs as expected on the custom board. (i.e. the LED blinks and I can stop the execution with the uVision debugger)

Does anyone have any idea why this might happen?

Does anyone have any trouble shooting tips I could try?

Thanks.

Marc

Parents
  • How/Where would I set the FAULTMASK to 1? In an initialization file?

    I am not familiar with the debug-ini-file, sorry.

    I assume that, the simplest firmware does not work on your custom LPC1788 board.
    If so, use Assembly or Inline/Embedded Assembly to set the FAULTMASK to 1, and test it with your custom LPC1788 board.

    My knowledge on the related topic is very limited. My idea may NOT be good.

    Sometimes, the debugger can NOT set the processor status properly at the correct timing, some NOP may give the debugger enough time to talk to the processor.

Reply
  • How/Where would I set the FAULTMASK to 1? In an initialization file?

    I am not familiar with the debug-ini-file, sorry.

    I assume that, the simplest firmware does not work on your custom LPC1788 board.
    If so, use Assembly or Inline/Embedded Assembly to set the FAULTMASK to 1, and test it with your custom LPC1788 board.

    My knowledge on the related topic is very limited. My idea may NOT be good.

    Sometimes, the debugger can NOT set the processor status properly at the correct timing, some NOP may give the debugger enough time to talk to the processor.

Children