I’ve used MC9S12XEG128 and I used EEE for data storage.
In some units after initializing EEE, FERSTAT_ERSVIF0 be set and EEE won’t transfer any data to D-Flash.
What should I do for FERSTAT Error handling?
yes, problem still exists, but I've changed topic to
MC9S12XEG EEE repartitioning problem
and persuade problem on that.
thanks.
In fact I never met with such issue.
ERSVIF0 bit:
The setting of the ERSVIF0 flag indicates that the memory controller was unable to format a D-Flash EEE sector for EEE use. The ERSVIF0 flag is cleared by writing a 1 to ERSVIF0. Writing a 0 to the ERSVIF0 flag has no effect on ERSVIF0. While ERSVIF0 is set, it is possible to write to the buffer RAM EEE partition but the data written will not be transferred to the D-Flash EEE partition.
So, ERSVIF0 can be cleared, however I suppose that this will not solve root cause of this issue.
Critical EEE Fault Flags
The access error (ACCERR) bit will be set by:
• The Enable EEE and Disable EEE commands if there is no EEE partition defined
• Either of the partition D-flash commands if an illegal partition ratio is requested
• The Enable EEE command if there is no EEE partition defined
• Errors encountered while initializing the EEE RAM during the FTM reset sequence
The MGSTAT0 and MGSTAT1 bits will set following reset for:
• The Partition D-flash command if an EEE partition is already defined
• Unrecoverable fault reading EEE partition information —in this case, the EEE feature is disabled
with ERPART => 0x0000 and DFPART => 0xFFFF
• Double fault detected reading the EEE protection byte in the flash configuration field—in this case,
the EPROT register is loaded with 0x7F = EEE RAM fully protected
So, from this description it seems that Partitioning was not successfully or data in IFR was damaged.
Unfortunately there isn’t any other way how restore data in IFR field except Mass Erase Blocks command.
In attachment you can find simple example code and short description of EEEPROM at S12XEP100.