AnsweredAssumed Answered

AN10995 - Hardfauld problem

Question asked by Thomas Havregaard Soerensen on May 17, 2017
Latest reply on May 21, 2017 by jeremyzhou

Hi

Im trying to get the AN10995 secondary bootloader to work on my LPCXpresso LPC1114 test board.
When building the bootloader, and opening the terminal program (tera term), i recive C, showing the bootloader is ready for reciving application file. by using xmodem via tera term, to transfere a application (application from AN10995), the terminal then stops reciving C, meaning the transfere has ended, and afterwards is the board reset, now checking the transfered program, validating the checksum and shows a success, but when the program tries to run the inline assembly code (see below), it seems as the program is frozen.

 

/* Load main stack pointer with application stack pointer initial value,
     stored at first location of application area */
  asm volatile("ldr r0, = 0x1000");
  asm volatile("ldr r0, [r0]");
  asm volatile("mov sp, r0");
  /* Load program counter with application reset vector address, located at
     second word of application area. */
  asm volatile("ldr r0, = 0x1004");
  asm volatile("ldr r0, [r0]");
  asm volatile("mov pc, r0");
The debugging showed that the program steps through the assembly commands above, but afterwards jumps to the "Hardfault_Handler" (see code below). This resoults in the IDE giving me an error (error reported by target, included as image)
void HardFault_Handler(void)
{
 /* Re-direct interrupt, get handler address from application vector table */
 asm volatile("ldr r0, =0x100C");
 asm volatile("ldr r0, [r0]");
 asm volatile("mov pc, r0");
}
I haven't changed any of the initial settings of either bootloader or application
Hope someone can give me a hint on what could be the problem. 
 

Attachments

Outcomes