S32K314 bootloader Jump to application error

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

S32K314 bootloader Jump to application error

4,731 Views
jwkang
Contributor III

Hello,

We are developing S32K314 on S32DS. I am writing code to create a project and jump to an application.
It seems to jump from Bootloader to Application's Reset_Handler, but the main routine is not executed. I can't get out because I exited with undefined_handler. Below is the currently executed application area.


jwkang_0-1719389901278.png

 

 

Bootloader calls Reset_Handler with the following code.
I tried debugging, and it seems to move to Reset_Handler just fine.

jwkang_1-1719389624029.png
 
 
Thanks if you can help me what I did wrong.
Tags (3)
0 Kudos
Reply
5 Replies

4,710 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @jwkang 

we got almost the same question also from another channel, so let me copy here the response I sent short time ago:

 

There are some differences betweeen S32K1 and S32K3. As you mentioned, the reset vector on S32K1 is hardwired to address 0x4. When you shift user application to some other area, it's offset+0x4.
On S32K3, there's Image Vector Table (IVT) used for booting. There are several locations which are checked automatically during the startup (0x40_0000, 0x50_0000...). The entry point for core 0 can be found at offset 0xC in the IVT. And notice that the section used in linker file is called as boot_header (this name was used for older devices).
See please attached screenshots.
So, if your boot_header section (IVT) is forced to 0x50_0100, you should jump to address which can be found at 0x50_0100 + 0xC.

The only demo we have for S32K3 devices is this Unified Bootloder:
https://community.nxp.com/t5/S32K-Knowledge-Base/Unified-bootloader-Demo/ta-p/1423099
But please notice that it's unofficial demo only provided AS IS with not guarantees and no support.

 

Regards,

Lukas

0 Kudos
Reply

4,684 Views
jwkang
Contributor III

Thank you for your review.

I found out that there is a boot_header IVT at the start location, and the Start address of Core0 is located at the offset 0xC address.
And I also knew the address of Reset_Handler located at Start address + 4.
So, Jump seems to move to those locations well, but an error still occurs at the same location.

There doesn't seem to be much difference in the Unified bootloader demo code.
What part did I set up wrong?

jwkang_0-1719479652308.png

Is there any more detailed information?

 

0 Kudos
Reply

1,489 Views
EllieLiu
Contributor I
I have the same problems, can you tell me how do you slove this problem?

Thanks very much!
Tags (1)
0 Kudos
Reply

4,668 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

What kind of error can you see?

Is everythinng de-initialized before the jump? Are interrupts disabled? I mean on all levels - in the core, by local enable bits in peripherals, in NVIC... Is core MPU and XRDC disabled?

Regards,

Lukas

0 Kudos
Reply

1,421 Views
EllieLiu
Contributor I

Hello Lukas,

Thanks for replying my question.

Before jumping, I disabled all the interrupts through "cpsid i". 

My colleague told me I need to disable the specific interrput. I will try.

 

Thanks and Regards !

Ellie

0 Kudos
Reply