I would like to partition the eeprom to store data.
I use this sequence as described in AN11983
FTFC-> FCCOB  = 0x80; /* FCCOB0: Selects the PGMPART command */
FTFC-> FCCOB  = 0x00; /* FCCOB1: No CSEc operation */
FTFC-> FCCOB  = 0x00; /* FCCOB2: No CSEc operation */
FTFC-> FCCOB  = 0x00; /* FCCOB3: FlexRAM loaded with valid EEPROM during reset sequence */
FTFC-> FCCOB  = 0x02; /* FCCOB4: EEPROM data set size code: EEESIZE = 2 (4 kB) */
FTFC-> FCCOB  = 0x03; /* FCCOB5: FlexNVM Partition code: 3 (Data flash 32 kB, EEPROM backup 32
But i Have always the ACCERR flag set as shown below
How to fix this?
Thanx in advance.
The partition code for the S32K148 is different in comparison with other S32K14x, please, refer to the below table in the AN11983:
"Table 5. FlexNVM partition codes for 64 kB FlexNVM devices (S32K148)"
Also, there is an EEPROM example for the S32K144, but the table above should be considered:
I hope it helps.