Hello:
Does the EEPROM section of the S32K146 chip have sectors, and if so, how large is each sector? If not, when updating 4 bytes of EEPROM data, is all EEPROM data erased first before writing?
Solved! Go to Solution.
This does not erase and rewrite entir FlexRAM, it will only updates the data stored at the address you are currently operating on.
What I mainly focus on is the write status of the FlexRAM region. If I modify 1 byte of data in FlexRAM, will it erase and rewrite the entire FlexRAM, or will it only modify the content at the address of that 1 byte?
This does not erase and rewrite entir FlexRAM, it will only updates the data stored at the address you are currently operating on.
This is a bit hard to explain because it's not a simple yes and no question
The eeprom of S32K consists of FlexRAM and FlexNVM. FlexNVM will be partitioned first and part of its space will be used for EEPROM backup. Actual users can only read and write EEPROM through FlexRAM.
When FlexNVM is configured to simulate EEPROM, when writing data to FlexRAM, the simulated EEPROM file system is called to program new EEPROM data, and the data is recorded in the simulated EEPROM in a circular manner. As needed, the emulated EEPROM file system identifies sectors in the emulated EEPROM backup sectors that are being erased (for future use) and sectors that have been erased. When the EEPROM backup sector fills up, the system gradually copies the recorded data of the EEPROM that previously saved the oldest data sector into the previously erased EEPROM backup sector. When the sector copy is completed, the simulated EEPROM backup sector with the oldest data is marked as erased and remains in the erased state.