MC9S12XEG128 EEE ?

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

MC9S12XEG128 EEE ?

739 Views
adelantesey
Contributor IV

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?

 

Labels (1)
Tags (2)
3 Replies

421 Views
Monica
Senior Contributor III

Hello Adelante,

was this useful to you? Please keep us posted :smileyhappy:

Best regards,

Monica

0 Kudos

421 Views
adelantesey
Contributor IV

yes, problem still exists, but I've changed topic to

MC9S12XEG EEE repartitioning problem

and persuade problem on that.

thanks.

421 Views
RadekS
NXP Employee
NXP Employee

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.

  1. Please check if FCLKDIV register is correctly set after every MCU reset.
  2. Please check DFPART (0x12_0000 – 0x12_0001) and ERPART (0x12_0004 – 0x12_0005) values in IFR field.  You can also check duplicates at global addresses 0x12_0002 – 0x12_0003 and 0x12_0006 – 0x12_0007. These data will be available after command MMCCTL1_EEEIFRON = 1;     //enable EEEIFR in memory map

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.


0 Kudos