Second Bootloader LPC11E68

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Second Bootloader LPC11E68

1,234 次查看
felipeprovenzan
Contributor I

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

标签 (1)
标记 (2)
0 项奖励
回复
1 回复

943 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Felipe Provenzano,

I was wondering if you can upload your demo, then I can run the demo and replicate the issue on my board.

I'm looking forward to your reply.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复