I'm building a bootloader for the s32k144 MCU using the AN12218 as a reference. I'm using the processor expert flash_driver to program internal flash memory.
When using the FLASH_DRV_CommandSequence() function, the MCU reset completely; as you can see here:
When looking at the system reset status register, the reset seems to be caused by a LOCKUP EVENT.
What can cause such behaviour?
Can I catch this event to better understand where it comes from?
This function happens to be located inside the RAM because of the START_FUNCTION_DEFINITION_RAMSECTION macro. Do I need to do something to ensure it works properly?
- My bootloader linker file:
- I'm trying to write my program to 0x0000B000 and above.
- The problem is still happening without debugger.
- The processor expert component
Your help is very much appreciated.