Hi NXP:
I am testing to write data to the Emulation EEPROM and the power is turned off abnormally.When the power is turned on again, Read Eeprom data, Flash ECC error occurs and the code jump to IVOR1.This problem occurred very frequently ,How can i handle this?
I try to write 1 to MCR[EER] in IVOR1 to clear EER, but after that ,the code jump to IVOR4.
Thank you!
Hi,
termination of erase or program operation by unexpected reset or power-down usually leads to ECC errors in those blocks. EEE driver is able to recover but must be configured appropriately. There are two ways depending on a microcontroller - it's either handled by IVOR1 exception or (if it is supported) via MCR[ERR].
Method using MCR[ERR] is supported only on microcontrollers which allow user to suppress reporting of ECC errors on data blocks. MPC5775E/B support this:
And in the EEE source files, you can find that this method is selected:
But the driver does not touch PFCR3[DERR_SUP], so it's responsibility of user to set this bit.
Regards,
Lukas