Flash driver into HardFault_Handler

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

Flash driver into HardFault_Handler

Jump to solution
950 Views
ChowZJ
Contributor II

Hi ALL,

The MCUs I'm using are the S32K312, as well as the S32DS3.6 and RTD500.Then I have a very strange problem now. When I burn the program to 0x00460000, HardFault_Handler() appears in my writes to Flash, but when I burn the program to 0x00580000 it successfully writes to Flash.

ChowZJ_0-1753095749749.png

And of course I put the relevant functions into ram. And also used a function to disable interrupts before writing to flash.

#define DISABLE_GLOBAL_INT() __asm__ __volatile__(" cpsid i")
#define ENABLE_GLOBAL_INT() __asm__ __volatile__(" cpsie i")

ChowZJ_1-1753095832200.png

ChowZJ_2-1753095843614.png

ChowZJ_3-1753095853561.png

 

Tags (2)
0 Kudos
Reply
1 Solution
913 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @ChowZJ 

Please take a look at the recommendations in the thread: [RTD400HF01 LLD]K312 No HSE secure debug operation. Let me know if the issue persists afterward.

 

BR, VaneB

View solution in original post

0 Kudos
Reply
1 Reply
914 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @ChowZJ 

Please take a look at the recommendations in the thread: [RTD400HF01 LLD]K312 No HSE secure debug operation. Let me know if the issue persists afterward.

 

BR, VaneB

0 Kudos
Reply