Thanks.But now I have a new problem, I can't run the app normally when I jump to the app, which makes me have no clue.
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)P_FLASH_APP;
/* Jump to application PC (r1) */
__asm("mov pc, r1");
}
void jump_app_fuc(void)
{
EDMA_DRV_Deinit();
LPUART_DRV_Deinit(INST_LPUART1);
FLEXCAN_DRV_Deinit(INST_CANCOM1);
INT_SYS_DisableIRQGlobal();
JumpToUserApplication(*((uint32*)P_FLASH_APP), *((uint32*)(P_FLASH_APP + 4)));
while(1)
{}
}
