AnsweredAssumed Answered

LPC11c24 controller interrupt vector offset relocation

Question asked by Anusha G on Dec 18, 2018
Latest reply on Dec 18, 2018 by Kerry Zhou


Iam working on LPC11C24 micro controller. we are developing a  secondary boot loader by using IAP commands. In bootloader, while jumping to application, we are not able to relocate interrupt vector table.

Application  using CAN_IRQn , EINT1_IRQn, SysTick_IRQn , where as bootloader need to use CAN_IRQn, SysTick_IRQn in the bootloader . Application and bootloader are using same interrupts (CAN_IRQn, SysTick_IRQn). 

I tried by using vector table relocation to RAM as mentioned in some posts,but observed that application interrupts are not working.

Suggest on this.


please find below implementation. My application code starts from 0x3000. RAM starts from 0x10000000.

tried by writing redirecting to RAM code in bootloader code as well as application also. 

#define vector_in_ram  ((uint32_t*)0x10000000)



uint8_t i;
uint32_t *p = (uint32_t *) 0x3000;
for(i = 0; i<128; i++)
vector_in_ram[i] = *p;


asm volatile("ldr r0, =0x3000");
asm volatile("ldr r0, [r0]");
asm volatile("mov sp, r0");

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


Please provide some inputs on this.