AnsweredAssumed Answered

Second Bootloader LPC11E68

Question asked by Felipe Provenzano on Nov 22, 2016
Latest reply on Nov 23, 2016 by jeremyzhou

Hi,
I am going crazy trying to understand whats wrong with my code, i am following this thread:


IAP code, unable to jump on user application for LPC11UXX(Cortex M0) 

and this AN:

http://cache.nxp.com/documents/application_note/AN11511.zip

 

What i have:

- Bootloader located at 0x0000
- Application Code located at 0x30040

- The LPC11E68 do not have VTOR register, so i created the manual redirection of the interrupts (as the AN11511) Ex:

void PIOINT0_IRQHandler(void)
{
    /* Re-direct interrupt, get handler address from application vector table */
    asm volatile("ldr r0, =0x300FC");
    asm volatile("ldr r0, [r0]");
    asm volatile("mov pc, r0");
}

 

My problem:

If i run from the Flash Magic and click on "GO" from the address 0x30040 the application works fine, but when i try to jump from my bootloader the code stuck....

 

my start app code:

void boot_start_app()
{
    asm volatile("ldr r0, =0x30040");
    asm volatile("ldr r0, [r0]");
    asm volatile("mov sp, r0");

 

    asm volatile("ldr r0, =0x30044");
    asm volatile("ldr r0, [r0]");
    asm volatile("mov pc, r0");
}

 

I am without a jtag in the moment, so i am in a try and error strategy.

 

Do you have some ideas?

 

Best regards

Outcomes