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.

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")


