In our project, I want to store some configuration into EEPROM of the MCU, I check the sample code of flash_partitioning.
The code can write the data into EEPROM:
address = flashSSDConfig.EERAMBase;
size = sizeof(uint32_t);
ret = FLASH_DRV_EEEWrite(&flashSSDConfig, address, size, sourceBuffer);
DEV_ASSERT(STATUS_SUCCESS == ret);
But after reset the MCU, read the data is always 0xff.
My question is:
1. Is the data write into EEPROM with the example project?
2. How to read out the data in EEPROM, I cannot find the read function in flash_driver.c
Please help me, thanks
Hi,
here are two examples for EEPROM usage (one based on SDK, second one without SDK):
Example: S32K144 EEEPROM usage
https://community.nxp.com/docs/DOC-340625
Hope it helps.
Jiri
Hi Jiri,
I am following your guild to use the EEPROM on S32K144, first time I can flash the board(S32K144 EVB),
But I got the error as below when I flash again, do you know why?
;device freescale, s32k144f512m15, pflash_dflash_eeprom
;begin_cs device=$00000000, length=$14001000, ram=$20000000
Loading programming algorithm ...
WARNING - Selected .ARP file has been modified. CRC16 = $4977
Done.
CMD>PA 0204
Started.
Done.
Programming sequency is : erase, blank check, program, and verify {default}
CMD>VC
Verifying object file CRC-16 to device ranges ...
block 00000000-0000D1EF ...
Calculated CRC-16 does not match block. (File = $B18C, Device = $72E3)
Error verifying flash of device
CMD>EM
Thanks
Jay
Hi Jay,
If I remember it correctly - there is some issue with PE Micro plugin related to memory preservation.
You can try remove Memory preservation for FlashNVM range. Also emergency kinetis device recovery may help:
Jiri