Flash partitioning EEPROM

cancel
Showing results for 
Search instead for 
Did you mean: 

Flash partitioning EEPROM

Jump to solution
746 Views
972276616
Contributor II

Dear team,

 

When using S32K116

I have a few questions about Flash partitioning and using analog EEPROM.

1. Do you have to erase all Flash areas before using the Flash _DRv_deflashpartition interface in the SDK?

2. Do I need to burn code that mimics EEPROM and my normal code in two executions?

3. If I write the partition with simulated EEPROM code and my functional code together, after erasing all Flash, will the code in P-Flash be lost and won't work properly after repowering?

4. After I tried to erase the entire Flash using the JFlash tool, the debugger was unable to connect to the MCU.

5. I once tried to execute the partition in the full-speed running mode, but the partition failed. The single-step execution in the debugging mode could make the partition successful, what is the problem?What do I need to focus on?

 

Hope to get detailed explanation, thank you

Regards,

Zhengyu

0 Kudos
1 Solution
731 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Zhengyu,

A1.

Please see the description below

danielmartynek_0-1609764036063.png

In other words, If the MCU has not been partitioned yet, the flash IFR is erased by default and FlexNVM is erased by the Program partition command anyway.

But if it has been already partitioned, you need to Mass erase the MCU before it can be partitioned again.

A2.

There is no such restriction. The application code can partition the MCU.

A3.

PFlash does not have to be erased before the FTFC Program Partition command is launched.

A4.

Hard to say what could be wrong.

A5.

The FTFC Program Partition command must be launched from flash memory.

The function that launches the command can be in SRAM or it can be done by the programmer.

danielmartynek_1-1609764499651.png

 

Regards,

Daniel

 

 

View solution in original post

0 Kudos
2 Replies
732 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Zhengyu,

A1.

Please see the description below

danielmartynek_0-1609764036063.png

In other words, If the MCU has not been partitioned yet, the flash IFR is erased by default and FlexNVM is erased by the Program partition command anyway.

But if it has been already partitioned, you need to Mass erase the MCU before it can be partitioned again.

A2.

There is no such restriction. The application code can partition the MCU.

A3.

PFlash does not have to be erased before the FTFC Program Partition command is launched.

A4.

Hard to say what could be wrong.

A5.

The FTFC Program Partition command must be launched from flash memory.

The function that launches the command can be in SRAM or it can be done by the programmer.

danielmartynek_1-1609764499651.png

 

Regards,

Daniel

 

 

0 Kudos
293 Views
KILLERzheng
Contributor IV

Hi Daniel,

I want to know, is there any way to partition the FlexNVM but not reset or erase?

Because I put the bootloader to FlexNVM, and I also want to save data to EEPROM backup. But the partition operation in bootloader or app makes the FlexNVM be erased, so as to my bootloader could not work.

Or is there any way to partition the FlexNvm before the bootloader running?

0 Kudos