How do I read and write to the S32K144 EEPROM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I read and write to the S32K144 EEPROM

945 Views
liqing
Contributor II

Hi NXP Team:

How do I read and write to the S32K144 EEPROM? I hope to offer a routine, thank you!

0 Kudos
1 Reply

666 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi liqing,

Please refer to theflash_partitioning_S32k144 SDK example.

pastedImage_3.png

As you can see, the example uses FLASH_DRV_EEEWrite() function and reads the EEPROM by a pointer:

/* Try to write data to EEPROM if FlexRAM is configured as EEPROM */
 if (flashSSDConfig.EEESize != 0u)
 {
   address = flashSSDConfig.EERAMBase;
   size = sizeof(uint32_t);
   ret = FLASH_DRV_EEEWrite(&flashSSDConfig, address, size, sourceBuffer);
   DEV_ASSERT(STATUS_SUCCESS == ret);
 
 /* Verify the written data */
 if (*((uint32_t *)sourceBuffer) != *((uint32_t *)address))
 {
   /* Failed to write data to EEPROM */
   exit_code = 1u;
   return exit_code;
 }

Regards,

Daniel

0 Kudos