Intel® MAX® 10 User Flash Memory User Guide

ID 683180
Date 8/30/2022
Public
Document Table of Contents

4.2.4. UFM Sector Erase Operation

The sector erase operation allows the UFM to erase by sectors.
To perform a UFM sector erase operation, follow these steps:
  1. Disable the write protection mode. Write 0 into the write protection register for the sector through the Avalon-MM control interface.
  2. Write the appropriate bits into the control register to select the sector erase location. The flash IP core stores the sector erase address and initiates the sector erase operation.
    Note: The IP core only accepts the sector erase address when it is in IDLE state; busy field at status register is 2'b00. If the IP core is busy, it will ignore the sector erase address.
  3. The flash IP core sets the busy field in the status register to 2'b01 when the erase operation is in progress.
  4. The flash IP core then asserts the waitrequest signal if there are any new incoming read or write commands from the data interface.
  5. The flash IP core erases the sector. It stores the physical flash erase result in the erase successful field in the status register when the sector erase operation completes.
    Note: The maximum erase time is 350 ms.
  6. The flash IP core sets the erase successful field in the status register to 1'b0 (failed) if one of the following conditions takes place:
    • You send an illegal sector number.
    • The sector protection mode or write protection mode of the corresponding sector is not clear (the value is not 1'b0).
  7. Repeat the earlier steps if you want to perform another sector erase operation.
  8. You have to enable back the write protection mode when the sector erase operation completes. Write 1 into the write protection register for the corresponding sector through the Avalon-MM control interface.
    Note: Check the status register after each erase to make sure the erase operation is successful (erase successful).