HI,
I want to configure S32K142 board for internal EEPROM.
It has 64KB of flexible non-volatile memory (FLEXNVM).
But in most of the examples that are posted, it is talking about FlexRAM and using that as emulated EEPROM.
The FlexRAM is just 4 KB. How will I be able to access the the EEPROM that is configured in the D-flash, for the FlexRAM area. Say the D-flash is configured for 32 KB EEPROM and 32 KB D-flash, then how will the flexram which is just 4 KB able to access this location ? (say if entire 64 KB of the flash is configured as EEPROM then how is it possible to access this from FlexRAM).
This EEPROM and partitioning is very confusing. I find no clear documentation or example solving the problem. Kindly explain the concept.
I want to partition the D-flash for EEPROM and use it. How to do the partition ?
EEPROM emulation is well described in AN11983: https://www.nxp.com/docs/en/application-note/AN11983.pdf
To your questions: FlexRAM cannot be divided, it either serves EEPROM data access point or it works as a RAM as a whole. FlexNVM can be divided (on S32K142, 4 options) to be partially EEPROM backup and partially Data Flash. It has also relation to EEPROM endurance as you may read in AN11983, section 7, because as a user you also configure EEPROM / FlexRAM partition size ratio.
Hi @davidtosenovjan
Thanks a lot for you response.
I have three more questions to as
Questions
1. EE RAM is just 4 KB. How is it able to access say the four different options of EEPROM. To be more precise, say I am using the entire NVM as EEPROM. How is the RAM adjusting to the big size like 64 KB, the RAM is just 4KB. Could you please be more elaborate on how actually it is working. ? at the hardware level too.
2. Say I have divided the NVM into flash and EEPROM. Can I see the data that is getting written in to the EEPROM memory location in the MEMORY WINDOW ?
If no, then why ?
3. In the net there is a tool based (s32 design studio advanced option based) choice for me to partition. What is the difference between doing that in code and doing the partition through tool ? are both the same ?
4. Say I am not interested in this partitioning. Can I allocate a separate section in D-Flash, via the linker file and use that location to write some data.
NOTE: This section will be common for both BOOTLOADER and APPLICATION
I will place my reset
Can i use it that way ? Is there any potential problem that you think here.
Regards
Abhijith Shankar
1) It is just give by EEPROM / FlexRAM partition size ratio. EEPROM emulation driver (in this case HW) basically spreads programmed data content over the whole data flash in order to prevent wearing out of particular flash portions.
2) EEPROM data you will see in the FlexRAM, it is access point for emulated EEPROM. Flash content is normally memory mapped.
3) I don’t know this tool. I believe it offers same functionality.
4) By default, there is no valid code, thus it is needed to perform partition programming once.