MPC5XXX power loss druing Flash erase/write

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

MPC5XXX power loss druing Flash erase/write

1,030 Views
thomaspikett
Contributor I

According to Google a similar thread already exists but i can't find it here. So... MPC5554 if it loses power during an onboard flash erase/write causes a Data Storage interrupt when power is restored and the program accesses the area that was being erase/written. What is the best way to deal with this? I don't want to handle the DS interrupt because it is a level higher than the normal DEC interrupt I use and the system cannot return from a DS to a DEC.

Labels (1)
1 Reply

733 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

yes, if the program or erase operation is terminated by reset, the flash is left in undefined state and there will be, most likely, double bit ECC errors - it depends when the operation is terminated exactly. If you access data or fetch code which is corrupted (double bit ECC error) then IVOR2 (data storage) or IVOR3 (instruction) is triggered. This behavior can't be disabled because the program flow cannot continue. This must be handled using the IVOR2/3. There's no other way.

You can take a look at this application note for more information:

http://www.nxp.com/files/microcontrollers/doc/app_note/AN5200.pdf

http://www.nxp.com/files/microcontrollers/doc/app_note/AN5200SW.zip

Regards,

Lukas