Hi Alice,
I am using AN2295,Processor MKL02Z32VFM4 and KDS ver.2.0.0..After going through several posts in community and your reply, i found that Jump address(__thumb_startup function) is always located @RELOCATED_VECTORS+4 address. Thanks for that..
I am using the below function to JumpTouser_Application and bootloader is resetting..I am successfully able to download the user application but when i send quit command it is resetting..I am using AN2295,Processor MKL02Z32VFM4 and KDS ver.2.0.0.
void JumpToUserApplication(uint32_t userStartup)
{
SCB_VTOR=RELOCATION_VERTOR_ADDR;
/* set up stack pointer */
__asm("ldr r1, [r0,#0]"); //get the stack pointer value from the program's reset vector
__asm("mov sp, r1"); //copy the value to the stack pointer
__asm("ldr r0, [r0,#4]"); //get the program counter value from the program's reset vector
__asm("blx r0"); //jump to the start address
}
Kindly provide some inputs if the above code is correct??
Thanks in advance,
Girish Kumar