S32K148 flash partitioning without deleting data flash

Showing results for 
Search instead for 
Did you mean: 

S32K148 flash partitioning without deleting data flash

Contributor I

Hello all,

I face a problem that data flash (part of FlexNVM) is deleted during flash partitioning command 0x80 (PGMPART). I would like to flash a code to the code flash and also data to the data flash during production flashing via JTAG interface (e.g. J-link from Segger). But when the code is executed first time, it recognize that flash is not partitioned and executes flash partitioning command 0x80 (PGMPART) which erases complete FlexNVM.


  • Please can somebody suggest an approach to flashing data flash and flash partitioning?
  • Is there a way to do the flash partitioning during flashing via JTAG (without executing code calling partitioning command PGMPART)? For example by direct flashing value to SIM->FCFG1. I want to keep the production flashing process simple and fast.


I have tried also the opposite approach. I have flashed code doing flash partitioning, started this code and then flashed the data to data flash. It works, but only when I erase only sectors in the range 0x10000000 - 0x1005FFFF. When I erase more, the partitioning is corrupted and must be repeated on the next code execution. It makes sense to me. Sectors from 0x10060000 are probably used for EEE backup (64KB). I would like to ask whether this approach is save.

  • What else can corrupt the partitioning?


Thanks for any hints,

Libor Waszniowski

0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi, I would share screenshot from AN11983.


Flash partitioning itself needs to be executed from SRAM. Then you may store data to flash.


0 Kudos