AnsweredAssumed Answered

S32K MCU reset when using FLASH commands.

Question asked by Gabriel Berthiaume on Sep 25, 2019
Latest reply on Mar 23, 2020 by Daniel Martynek

Context:

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.


The problem:
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.

 

The question

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?

 

Additional information

  • 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.

 

 

Outcomes