Success! Subscription added.
Success! Subscription removed.
Sorry, you must verify to complete this action. Please click the verification link in your email. You may re-send via your profile.
This wiki page is dedicated towards users that are using the Intel Generic Serial Flash controller with EPCQ flash or other flash and are looking to erase the entire flash and protect blocks of memory. There are some example designs, but none seemed to adequately cover erasing parts of the flash or the entire flash. Similarly, no examples were found to do block protection or protect the entire flash.
This example was created using Cyclone V, EPCQ256, and the Intel Generic Serial Flash controller. The example was compiled and programmed to a TerASIC Cyclone V development kit and then proven using System Console. The example should allow for embedded developers to leverage the sequence of read and write commands using system console into their NIOSII or other CPU complex.
The following qar file contains the design example which was compiled and archived using Quartus version 18.1 build 625.
Intel Generic Flash Erase Protect.qar - see attached at the bottom of this article
The example design contains a Platform Designer (Qsys) design that looks as follows:
The design uses a known good external clock running at 50Mhz on the TerASIC Cyclone V board at PIN_R20.
This example runs on the TerasIC Cyclone V GX Starter board.
TerasIC Cyclone V-GX Starter Kit
The following Tcl script is used to setup a number of procedures that can be run real time in System Console or be used as procedures for embedding into other scripts if needed.
System Console EPCQ256 Generic Flash IP.tcl
Using the procedures in Tcl script, the following can be performed:
Program the Cyclone V and then open up System Console.
Once in System Console:
Now all the procedures are available to run.
Do the following:
Will take a few minutes… should see “……” in blocks of 60 and then newline.
At any time, you can issue this command to check the status register of the Flash:
No memory should have been written
The example provided works for Cyclone V and the EPCQ256. The example can be leveraged into other Intel FPGA families and other flash devices.
Update 2/6/20
Community support is provided Monday to Friday. Other contact methods are available here.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
For more complete information about compiler optimizations, see our Optimization Notice.