there some questions after i read the S32K-RM and s32kAPI document, hope someone give some advices,thank you ,hope your repy.
1>in the picture ,only the flexnvm could used for eeprom,but when i read the api document ,i feel so confused: the ee2prom is divided from flexnvm or flexram?
2>in the s32k-rm,if i want to use both eeprom and data flash ,how should i give value to the registers :
FCCOB4[3:0] FCCOB5[3:0] ,the EEPROM Data Set Size is equal to EEPROM-backup Size (KB) ?????
3>in other's examples , i want to know :in this example:
the flexnvm(64k) is totally used for eeprom????
the space EEPROM size = 4 Kbytes is from where????
/*
* Configure FlexRAM as EEPROM and FlexNVM as EEPROM backup region,
* DEFlashPartition will be failed if the IFR region isn't blank.
* Refer to the device document for valid EEPROM Data Size Code
* and FlexNVM Partition Code. For example on S32K148:
* - EEEDataSizeCode = 0x02u: EEPROM size = 4 Kbytes
* - DEPartitionCode = 0x04u: EEPROM backup size = 64 Kbytes
* */
flashResult = FLASH_DRV_DEFlashPartition(&flashSSDConfig, 0x02u, 0x04u, 0x0u, false, true);
all you question can be found an answer in this application note.
AN11983 is also a good guide to understand how EEPROMs work.
tthank you ,i have read this article in the morning ,it helps me a lot ,
but i still have questions ,if i uesd the flexram as eeprom, when i have written to the 4k FLEXRAM,will it lose data after power off ????
then ,all will can do to operate flexnvm eeprom backup is only to operate flexram ????
when i want to get data ,from eeprom,the address must be flexram address?
hope your reply!!!!!!!
You can find the answers to these questions in the article I gave you.
First of all, the data of FlexRAM will be lost when the power is off, but after power-on, you can set to automatically load the data of E-Flash to FlexRAM, you only need to operate FlexRAM, please do not operate the FlexNVM area that has been partitioned as backup.
thank you ,i have test the flexram after used for eeprom