S32K144 save data into EEPROM

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K144 save data into EEPROM

1,428 Views
jay_zhang
Contributor II

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

0 Kudos
3 Replies

571 Views
jiri_kral
NXP Employee
NXP Employee

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 

0 Kudos

571 Views
jay_zhang
Contributor II

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

0 Kudos

571 Views
jiri_kral
NXP Employee
NXP Employee

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: 

pastedImage_1.png

Jiri

0 Kudos