s32k344 jumping to application from bootloader triggers hardfault

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

s32k344 jumping to application from bootloader triggers hardfault

跳至解决方案
948 次查看
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 解答
897 次查看
danielmartynek
NXP TechSupport
NXP TechSupport
0 项奖励
回复
5 回复数
898 次查看
danielmartynek
NXP TechSupport
NXP TechSupport
0 项奖励
回复
886 次查看
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 项奖励
回复
863 次查看
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 项奖励
回复
860 次查看
lluo
Contributor III

Hi @danielmartynek ,

Noted. Thank you.

0 项奖励
回复
894 次查看
lluo
Contributor III

Hi @danielmartynek ,

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

0 项奖励
回复