s32k344 jumping to application from bootloader triggers hardfault

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

s32k344 jumping to application from bootloader triggers hardfault

ソリューションへジャンプ
693件の閲覧回数
lluo
Contributor III

Hi, 

Currently I am trying to jump to application from bootloader in s32k344. I am using the following code to do the task:

__asm volatile ("cpsid i");  // disable all the interrupts

S32_SCB->VTOR = (uint32)0x00601000;  // assign the start address of the vector table
 
__asm(" ldr r1, = 0x00600000");            // get the stack pointer value from the program's reset vector__
 
__asm(" mov sp, r1");
 
__asm(" ldr r1, = 0x00600004");            // get the program counter value from the program's reset vector
 
__asm(" mov pc, r1");
 
But the application code stops at hardfault_handler (0x0060614a HardFault_Handler)
The map file of the application code is generated as shown below:
lluo_1-1711624951786.png

Do you probably know why it triggers HardFault_Handler(0x0060614a HardFault_Handler)? Thank you in advance.

 
タグ(1)
0 件の賞賛
返信
1 解決策
642件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信
5 返答(返信)
643件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信
631件の閲覧回数
lluo
Contributor III

Hi @danielmartynek ,

One more question, if I use the above method to jump to application which is running the FreeRTOS_Toggle_Led_Example_S32K344 demo, it works correctly. While if I use the above method to jump to application which is running the lwip_s32k344 demo, it can not work as expected. Do you probably know the reason for this? Thank you in advance. 

0 件の賞賛
返信
608件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @lluo,

It requires some debugging on your side. The examples are provided AS IS with no guarantees and no support. Currently we do not have resources to support the demos.

 

Regards,
Daniel

0 件の賞賛
返信
605件の閲覧回数
lluo
Contributor III

Hi @danielmartynek ,

Noted. Thank you.

0 件の賞賛
返信
639件の閲覧回数
lluo
Contributor III

Hi @danielmartynek ,

The provided solution works for me. Thank you for the support.

0 件の賞賛
返信