S32K146: How do I properly create and maintain a DFlash partition for parameter storage?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K146: How do I properly create and maintain a DFlash partition for parameter storage?

Jump to solution
1,371 Views
mikesfn
Contributor III

I'm following the S32DS example project "flash_partitioning_s32k146" and have also seen this post. All very informative, however, the problem I have is that none of this, nor the reference manual, clearly answer for me the most basic questions when first approaching this problem. For example:

 - Is the S32DS sample program intended to be an example of any application that uses a DFlash partition? Which part actually creates the partition in the first place? Once the partition is created, does the program constantly re-create the partition every time it is run on start up? How would this partition be accessed by a user application at runtime?

What I want to do is to create a single FlexNVM partition for data storage. I would like to be able to access this partition in a user application and to be able to write to it at runtime such that the data is static beyond each processor reset.

1) How do I go about this?

2) How do I later erase and remove the partition to restore the FTFC to its default setting? 

Thanks

Labels (1)
0 Kudos
1 Solution
1,276 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Michael,

I would like to suggest you seeing AN11983 Using the S32K1xx EEPROM Functionality

https://www.nxp.com/docs/en/application-note/AN11983.pdf

I believe that you will find there the most of the answers.

See some information from an application description of the "flash_partitioning_s32k146":

 

The purpose of this demo application is to show you the usage of the FLASH driver with the S32 SDK API.

 

The examples does the following operations:

  • Partitions the flash
  • Configures FlexNVM region as EEPROM
  • Erases flash
  • Programs flash
  • Write data to EEPROM.

 

 I would like to be able to access this partition in a user application and to be able to write to it

1) How do I go about this? 

Please, refer to the section “3.6 S32K1xx reading and writing the EEE” in the AN11983.

 2) How do I later erase and remove the partition to restore the FTFC to its default setting?  

Mass erase operation on Flash removes partitioning.

I hope it helps.

Best regards,

Diana

View solution in original post

0 Kudos
2 Replies
1,277 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Michael,

I would like to suggest you seeing AN11983 Using the S32K1xx EEPROM Functionality

https://www.nxp.com/docs/en/application-note/AN11983.pdf

I believe that you will find there the most of the answers.

See some information from an application description of the "flash_partitioning_s32k146":

 

The purpose of this demo application is to show you the usage of the FLASH driver with the S32 SDK API.

 

The examples does the following operations:

  • Partitions the flash
  • Configures FlexNVM region as EEPROM
  • Erases flash
  • Programs flash
  • Write data to EEPROM.

 

 I would like to be able to access this partition in a user application and to be able to write to it

1) How do I go about this? 

Please, refer to the section “3.6 S32K1xx reading and writing the EEE” in the AN11983.

 2) How do I later erase and remove the partition to restore the FTFC to its default setting?  

Mass erase operation on Flash removes partitioning.

I hope it helps.

Best regards,

Diana

0 Kudos
1,276 Views
mikesfn
Contributor III

Thanks Diana.

0 Kudos