S32K144 bootload jump to HardFault_Handler

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

S32K144 bootload jump to HardFault_Handler

1,622 次查看
langweihua1643
Contributor I

Hello:

About my project, I have to add SPI-API into bootloader,in order to get data from SPI_flash(w25x16),but I found that:

Situation one:

---->I do hardware-init normally(include CLK_init,IO_init.SPI_init etc) ,and in main, I do nothing just jump to app directly,It is OK ,app works correctly.

Situation Two:

---->I only add one operation in main ,that is<after hardware-init , I read data from SPI_flash once>, and then jump to app, but it is NG, it will jump to HardFault_Handler.

In my thought , maybe caused by Interrupt or DeInit, so before jump , I Deinit IO, SPI,NVIC, and add __disable_irp(),but it doesn't work.

微信图片_20181213104333.png

so, I need help!!!

Thank you very much.

Best Regards.

标签 (1)
0 项奖励
2 回复数

1,198 次查看
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

I recommend you to debug the code. You can start with a reading CSFR register to determine which exception has occurred. The description of this register can be found on the link below.

http://infocenter.arm.com/help/topic/com.arm.doc.dui0553a/DUI0553A_cortex_m4_dgug.pdf 

Also, please refer to Fault handling on S32K144,  there can be found the description and example code shows the exception handling on S32K144 MCU.

Did you consider that the issue can be in reading data from SPI flash?

I hope it helps you.

Best Regards,

Diana

0 项奖励

1,198 次查看
klau
Contributor II

Hi,

I am having the exact same issue - on UART0.

Could you share your solution please?

Thanks,

Kevin

0 项奖励