Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Who rated this article

Who rated this article

How Erase Operation Works in NOR Flash – KBA223960

50 questions asked 10 questions asked 5 questions asked

Author: ZhiF_31          Version: **

Translation - Japanese: NORフラッシュの消去操作の仕組み - KBA223960 - Community Translated (JA)


What is an erase operation in NOR flash and how does it work?

When NOR flash devices leave the factory, all memory contents store digital value ‘1’—its state is called “erased state”. If you want to change any contents to store digital value ‘0’, you need to perform a program operation. To change the memory content back to ‘1’ state, you need to perform an erase operation that discharges the stored electrons from a range of memory cells. The memory cells in this entire range, called a sector, are discharged to a low-voltage state, i.e., digital value ‘1’. Thus, an erase operation is often called a Sector Erase operation. It is impossible to only erase a part of a sector. The erase operation is always applied to the whole sector.

While from the user’s perspective, an erase operation seems to be a single action, in fact, it includes many phases necessarily to complete a full erase, such as:

  1. Pre-programming: Bring all ‘1’ bits in the sector to ‘0’ state so they can all start being erased at the same level.
  2. Erasing: Multiple erase pulses are issued to discharge the memory cells. Each pulse takes certain amount of time. If the user suspends the erase operation, the very last erase pulse being suspended must start from the beginning of the pulse.
  3. Soft programming: After all memory cells become ‘1’ state, this step is necessary to bring up the voltage of some of the cells. This phase tightens the distribution of the voltage level across all cells and avoid over-erasing in some of the cells.
  4. Dynamic reference programming: This phase specifically applies to Cypress MirrorBit® NOR flash devices. It is necessary to program the internal dynamic reference cells in preparation of future voltage threshold calculation. If the reference cells are not being programmed properly, read operations may return incorrect data.

As you can see, an erase operation is not just erasing the memory cells containing digital value ‘0’. The operation includes many phases and is applied to all cells in the erased sector.

If an abrupt power loss occurs during an erase operation, depending on which phase the operation was in, it will result in different behaviors when reading the sector again after power cycle. The memory contents may be indeterminate. Although such power loss will not damage the memory cells physically, it is necessary to erase the sector again to ensure the memory cells are ready for normal operations. All new Cypress NOR flash devices, starting from 65-nm MirrorBit family, provide a status register to show if a power interruption happens to a sector; therefore, the system can take appropriate action based on this information.

For example, S25FS-S devices provide an ‘Evaluate Erase Status’ command to determine whether the last erase operation on a sector completed successfully. This command is very helpful to Flash File System software to recover the file system after a power loss.

Related KBA: Recover Flash Devices when Power Failure or Reset Happens During a Program or Erase Operation - KBA2....


Who rated this article