Is there an s32k144 app+bootload sample program?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there an s32k144 app+bootload sample program?

1,269 Views
652856839
Contributor I

Now I am implementing the app upgrade via bootload. But because of the time constraints, I need a sample program to implement this function faster. I hope to get help. Thank you.

0 Kudos
4 Replies

1,000 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Please refer to serial bootloader for the S32K1xx devices. The software is for the S32K148EVB,  However, it can be migrated to S32K144.

Application note:

https://www.nxp.com/docs/en/application-note/AN12218.pdf 

SW:

https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip 

I hope it helps.

Best Regards,

Diana

0 Kudos

1,000 Views
652856839
Contributor I

s32k144_bootloader_ld.pngs32k144_app_ld.png

0 Kudos

1,000 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

I have checked your linker files and the bootloader address space and the application address space overlaps.

For example, if you want to start of the application at address 0x0001_0000, the bootloader address space starts at address 0x0000_0000 and the end address can be 0x0000_FBF0.

Also, after you loaded the application into memory, please, check the application in the memory window in the S32DS.

Window -> Show View -> Memory (if it is programmed correctly)

Do you program the application using Srecord?

I hope it helps.

Best Regards,

Diana

0 Kudos

1,000 Views
652856839
Contributor I

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)
{}

}

AfterTheJump.png

0 Kudos