Hello NXP team/developers,
I am using S32K144.
Flash bootloader : 0x00-0xc000
Application : 0xc000-0x7ffff
Application reset handler : 0xc401(thumb instruction set)
Problem: After jumping to application, it stucks in OS_enable_interrupt function.
Below are some scenarioes :
Case 1: Flashed only application, it works fine.
Case 2: Flashed both FBL and application. Application stucks in hardfault.
Case 3: Flashed both FBL and application. Erased FBL first sector(0x00-0xFFF), Application works fine.
Also, in application startup file, VTABLE is reassigned to VTOR_Reg.
Why application is not running with FBL?
Thank you in advance.
Hi Ravindra,
For the jump to the application from bootloader, you can use the function below:
void startApplication(unsigned long app_link_location)
{
S32_SCB->VTOR=(uint32_t)(app_link_location);
asm(" ldr sp, [r0,#0]");
asm(" ldr pc, [r0,#4]");
}
The fault handler could be useful see Fault handling on S32K144
Best regards,
Diana