AnsweredAssumed Answered

LPC15xx bootloader

Question asked by Lakhbir Singh on Nov 9, 2018
Latest reply on Nov 12, 2018 by jeremyzhou

I have written a bootloader code which have to jump to the  Application code reside at the address 0x20000 .but boot code not able to jump to desired location . i have used the code to jump is  :  

pFunction  = function pointer;

void NVIC_SetVectorTable(uint32_t NVIC_VectTab, uint32_t Offset)
SCB->VTOR = NVIC_VectTab | (Offset & 0x1FFFFF80);

/*** Jump to application ******************************************************/
void JumpToAddress(uint32_t Address)
uint32_t JumpAddress = *(__IO uint32_t*)(Address + 4);
pFunction Jump = (pFunction)JumpAddress;

NVIC_SetVectorTable(0x00000000 , Address);
__set_MSP(*(__IO uint32_t*) Address);