S32K144 bootload jump to HardFault_Handler

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

S32K144 bootload jump to HardFault_Handler

1,623 Views
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.

Labels (1)
0 Kudos
2 Replies

1,199 Views
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 Kudos

1,199 Views
klau
Contributor II

Hi,

I am having the exact same issue - on UART0.

Could you share your solution please?

Thanks,

Kevin

0 Kudos