Problem in jump to application in s32k324 controller

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

Problem in jump to application in s32k324 controller

465 Views
nishanth_s12
Contributor I

Hi all,

i am facing the issue with s32k324 controller.

After jumping from boot loader to application code, pointer stuckup with one particular location. Application is not running.

 

My code is below:

#define APP_START_ADDRESS 0x00504000 /*This is application memory address*/

JumpToUserApplication(*((uint32_t*)APP_START_ADDRESS), *((uint32_t*)(APP_START_ADDRESS + 0x4)));      (Note: Instead of 0x04, i have tried offset address of 0xC also,the same is not working)

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");
(void)userStartup;
}
 
 
 
i have changed the application start address in linker file and the same attached below.
nishanth_s12_0-1710143747091.png

 

 

Pointer stuckup with below location and not moving further.

nishanth_s12_1-1710143999270.png

 

Kindly provide the solution for the same.

 

 

 

0 Kudos
5 Replies

451 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @nishanth_s12 

Check the following community post. It has information related to the topic that you might find useful. 

S32K312 Bootloader jump to application address

 

B.R.

VaneB

0 Kudos

441 Views
nishanth_s12
Contributor I

HI @VaneB 

I am tried your suggested solution. But it is giving Hard Fault Handler. 

Shall we need to write a more code to jump the application address by assembly level language.

If yes means, please provide the code for s32k324 controller.

 

 

 

 

0 Kudos

436 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @nishanth_s12 

The only bootloader example available for S32K3 devices is the Unified bootloader Demo.

0 Kudos

414 Views
nishanth_s12
Contributor I

Hi @VaneB ,

i am trying to check the bootloader example code "S32K324_CAN_Bootloader_RTD2d0" given in Unified bootloader Demo.

My RTD version is 3.0.0 but Demo code vertion is 2.0.0.

I am unable to build. It is showing the below error.

nishanth_s12_0-1710398959937.png

As per "Solved: S32K342 CAN bootloader sample code implement problem - NXP Community " community post, i am trying to create the new project.

To see driver configuration in "S32K324_CAN_Bootloader_RTD2d0" , I am trying to open the "S32K324_CAN_Bootloader_RTD200_M7_0.mex" file. It shows below error.

nishanth_s12_1-1710399131933.png

Kinldy suggest the solution for the above to run the bootloader example code.

 

 

 

 

0 Kudos

396 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @nishanth_s12 

This project was created using S32DS v3.4 and RTD v2.0.0. To open this project without any problem you can use that tool version and the SW version or install RTD v2.0.0. on S32DS v3.5.

The S32K3 Real Time Drivers Version 2.0.0 can be downloaded from S32K3 Standard Software -> Automotive SW - S32K3/S32M27x - Real-Time Drivers for Cortex-M and can be installed through Help -> Install New Software...

VaneB_0-1710439456570.png

NOTE: This SW version was created with a previous IDE version the correct functionality is not guaranteed. 

0 Kudos