LPC43S57: Hardfault in internal NXP bootloader

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

LPC43S57: Hardfault in internal NXP bootloader

1,637 Views
johanborkhuis
Contributor III

We are running into an issue with our generated application. Some information about this application:

  • Running from external SPIFI flash
  • Vector table located at 0x14000000
  • Build with IAR (version 8.30) in Release mode (optimisation high)
  • Startup code based on LPCOpen 3.02 (keil/iar mcb4357), using file iar_startup_lpc18xx43xx.s
  • CPU ID: 0x410FC241

Most of the time this works correctly, but once in a while the build does not start at all: the reset vector in our application is not even executed (this can be reproduced: when building the same code again this also happens, even when building on another machine). When we stop the processor using JTAG we see that the PC is pointing at 0x10400042. This address is within the internal NXP chip-bootloader. The vector table of this chip bootloader application (located at 0x10400000) shows that this is the Hardfault handler. The debugger reports:

Exception occured at PC = 0x10400194, LR = 0x1040b1ab

Why would the internal bootloader generate a hard-fault? What checks are done in the bootloader, which could result in a hard-fault? Is there a way to extract more information from the internal bootloader on what the cause of the problem might be?

Below is the vector table from our application in SREC format:

S3151400000030500010590200140D700014F76A0014D1
S3151400001001840014EF6A0014FF6A00148478FD77D3
S31514000020000000000000000000000000ED83001432
S31514000030F183001400000000F5830014F983001402
S3151400004009840014098400140984001400000000B3
S315140000500984001409840014098400140984001402
S31514000060098400140984001409840014C529001491
S3151400007009840014098400140984001409840014E2
S3151400008009840014098400140984001409840014D2
S3151400009009840014098400140984001409840014C2
S315140000A009840014098400140984001409840014B2
S315140000B009840014098400140984001409840014A2
S315140000C00984001409840014098400140984001492
S315140000D00984001409840014098400140984001482
S315140000E00984001409840014098400140984001472
S315140000F00000000009840014098400140984001403
S3151400010000000000DD510014098400140984001451

Edited:

The exact message in the Debug window from IAR:

Tue Dec 04, 2018 14:13:14: HardFault exception.
Tue Dec 04, 2018 14:13:14: The processor has escalated a configurable-priority exception to HardFault.
Tue Dec 04, 2018 14:13:14: A precise data access error has occurred (CFSR.PRECISERR, BFAR) at data address 0x10008000.
Tue Dec 04, 2018 14:13:14:
Tue Dec 04, 2018 14:13:14: Exception occured at PC = 0x10400194, LR = 0x1040b1ab
Tue Dec 04, 2018 14:13:14:
Tue Dec 04, 2018 14:13:14: See the call stack for more information.

Regards,

Johan Borkhuis

Labels (2)
Tags (3)
2 Replies

1,156 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Johan,

Could you share a simple example project so I can reproduce the behavior on my side?

Thanks in advance!

Best Regards,
Carlos Mendoza
Technical Support Engineer

1,156 Views
johanborkhuis
Contributor III

Carlos,

Thank you for your reply. I just sent you a private message on this

Regards,

Johan Borkhuis

0 Kudos
Reply