Generic Serial Flash Interface Intel® FPGA IP User Guide

ID 683419
Date 4/20/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

1.7.2.2. Reference Design Application Program

Figure 6. Reference Design Application Program Flow Diagram
Flow diagram sequence description:
  1. The application program starts with identifying the flash device attached to the FPGA.
    Note: The flash devices serve as samples to demonstrate this reference design only.
  2. The application program performs sector protection and erases the protected sector:
    1. To perform sector protect, the application program:
      1. Performs write enable command.
      2. Performs write status register command to set block protect (BP) bit and Top/Bottom(TB) bit.
      3. Polls write in progress (WIP) bit ( bit 0 of status register) until it returns a 0 (ready).
      4. Performs read status register command to check if sector protect operation succeeded or failed.
    2. To perform sector erase, the application program:
      1. Performs write enable command.
      2. Performs sector erase command.
      3. Polls write in progress (WIP) bit ( bit 0 of status register) until it return a 0 (ready).
      4. Performs read status register to check whether erase operation succeeded or failed.
  3. Erase error occurred because the sector is protected. The application program clears the error bit through:
    • Clear flag status register command (EPCQ-L or Micron*).
    • Clear status register command (Cypress*).
  4. The application program disables the sector protect:
    1. Performs write enable command.
    2. Performs write status register command to clear BP bit and TB bit.
    3. Polls WIP bit ( bit 0 of status register) until it returns a 0 (ready).
    4. Performs read status register command to check whether BP bit and TB bit has succeeded clear.
  5. The application program performs flash device programming after the sector is not protected. The application program:
    1. Performs write memory into the address with empty memory.
    2. Polls WIP bit (bit 0 of status register) until it returns a 0 (ready)
    3. Performs read back memory of the address to confirm the address has programmed.
  6. Repeat Step 2 and read back memory of the address. Memory is not erased because the sector is protected.