What happens if a power failure occurs while erasing a sector of FROM?

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

What happens if a power failure occurs while erasing a sector of FROM?

Jump to solution
415 Views
zunda1958
Contributor I

Please enlighten us.

What happens if a power failure occurs while erasing a sector of FROM?
Also, what happens if a power failure occurs while writing to FROM?
I intend to create a virtual EEPROM driver.
Thank you in advance.

Labels (1)
0 Kudos
1 Solution
376 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

What is the part number you are using?

This is NXP home page, pls search or seek the part number for the reference manual and data sheet.

www.nxp.com

It appears that there is issue now to access the website.

BR

XiangJun Rong

View solution in original post

0 Kudos
3 Replies
406 Views
prakash72
Contributor I

Hello,

If a power failure occurs while erasing a sector of Flash Read-Only Memory (FROM), or while writing to FROM, it can lead to corruption of the flash content. This is because the erase or program operation is an atomic process that, if interrupted, may leave the flash in an undefined state. Depending on when the interruption occurs, you might encounter issues such as double-bit ECC (Error Correction Code) errors, which the system cannot correct.

Similarly, for the MPC5xxx series, a power loss during flash erase or write operations can trigger a Data Storage (DS) interrupt upon power restoration if the program accesses the area that was being erased or written to.

When creating a virtual EEPROM driver, it is important to implement mechanisms to handle such power failure scenarios. This could include checking for flash integrity at startup, implementing a robust error-handling routine, and ensuring that critical data is saved in non-volatile memory with sufficient redundancy to recover from partial writes or erases.

It is also recommended to consult the reference manual for your specific NXP device, as it will provide detailed information on flash memory operations and any device-specific considerations for power failure scenarios.

Best regards,

0 Kudos
383 Views
zunda1958
Contributor I
Thanks for your answer.
I would appreciate it if you could provide me with the URL of the reference manual for the NXP device.
Thank you in advance.
0 Kudos
377 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

What is the part number you are using?

This is NXP home page, pls search or seek the part number for the reference manual and data sheet.

www.nxp.com

It appears that there is issue now to access the website.

BR

XiangJun Rong

0 Kudos