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
已解决! 转到解答。
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
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