Hi,
I recently started working on bootloader for s32k144. I am using s32ds for arm
can some one guide me how to change the MSP value to jump from bootloader to user application
you can refer to AN12218 and AN12218SW,
https://www.nxp.com/search?keyword=AN12218&start=0
and below demo code can be found in AN12218SW
/**
* Used to jump to the entry point of the user application
* The Vector table of the user application must be located at 0x1000
*
* */
void JumpToUserApplication( unsigned int userSP, unsigned int userStartup)
{
/* Check if Entry address is erased and return if erased */
if(userSP == 0xFFFFFFFF){
return;
}
/* Set up stack pointer */
__asm("msr msp, r0");
__asm("msr psp, r0");
/* Relocate vector table */
S32_SCB->VTOR = (uint32_t)APP_START_ADDRESS;
/* Jump to application PC (r1) */
__asm("mov pc, r1");
}