Hi,
I got a problem with the emulated EEPROM functionality on the S32K142. I have activated the emulated EEPROM with the following FTFC command (64kB EEPROM Backup Size & 4kB EEPROM RAM Size):
FCCOB0 = 0x80
FCCOB1 = 0x00
FCCOB2 = 0x00
FCCOB3 = 0x00
FCCOB4 = 0x02
FCCOB5 = 0x04
I also have a configuration struct that is placed at the following FlexRAM location:
user_config_t* const UserConfig = (user_config_t*) 0x14000000;
When I apply multiple read and write actions on that struct it ends in a hard fault error. Before I read or write to any member of the struct laying in the FlexRAM EEPROM, I am checking whether there is an ongoing flash operation:
while((FTFC->FSTAT & 0x80U) != 0x80U)
{
//Wait until previous flash operation has finished!
}
When I go through the programm step by step in debug mode, no hard fault error occure. Because of that I think that this is a problem of timing.
Do you got any hints for me?
Best regards
Tom