Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
Need Forum Guidance? Click here

Search our FPGA Knowledge Articles here.
18603 Discussions

Reading data from EPCS memory via USB blaster

Altera_Forum
Honored Contributor I
2,279 Views

Hi, I have a question. It is possible only reading data from EPCS memory (without any fuses) with use a Terrasic USB blaster? I construct myself EPCS programmer and i debuging it and need to correctly read written data from EPCS memory. 

 

Thank you for your answer
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
503 Views

Yes, you can use a Terasic USB-Blaster. The EPCS device is simply an SPI Flash re-branded with Altera's logo. If you understand SPI, then you understand how to program the flash. 

 

There are two methods for programming the EPCS device. The method to use depends on your board design. 

 

1. 10-pin Active Serial header. 

 

If you have a board that has a 10-pin header with the words "Active Serial" or "AS Mode" next to the header (the UP3 board has such a header), then that connector is wired directly to the EPCS flash. 

 

If you are creating a programmer board, then that board needs to have a power source, and wire the 10-pin JTAG header for Active Serial mode (the USB-Blaster data sheet has the pin assignments, and any of the device handbooks have figures showing how to use this mode). 

 

The Quartus programmer has a pull-down menu that allows you to select Active Serial mode. Select that option, plug the USB-Blaster into your board, and you can program the device. 

 

2. 10-pin JTAG Header. 

 

You can also program EPCS devices indirectly using an FPGA. You use the USB-Blaster to program the flash with a "Serial Flash Loader" (SFL) configuration, and then that is used as a JTAG-to-SPI bridge to program the EPCS flash. Quartus has a set of SFL designed pre-compiled, so you do not need to create the FPGA image, you just need to create the JTAG indirect configuration (.jic). 

 

Cheers, 

Dave
Altera_Forum
Honored Contributor I
503 Views

In addition to that (I think the OP was asking about reading, not writing): 

- For reading via JTAG, you can also make a .jic file (just as if you would want to write - with "Convert programming files"), but than select the "Examine" checkbox instead of "Program" in the Quartus programmer. The bad thing is that the read back data can only be stored as .jic file again. Maybe it is possible to make some sense of the contents of the .jic-file with a hex-editor... You can also create .jic-file from hex-files (instead or in addition to .sof data) and verify against a .jic-file and you can also do blank checks, so maybe this is of some help... 

- I think via the Active Serial header it is possible to examine and store hex-files, but I am not sure and have no hardware to test (since .jic, this is quite out-dated...). 

 

BTW: A frequent problem when programming config data "by hand" is the ordering of bits in the bytes, they often need to be swapped... (i.e. b7 = b0, b6 = b1, etc.) 

 

And: Of course you could also use an Entner Electronics EEBlaster ;-) 

 

Regards, 

 

Thomas 

 

www.entner-electronics.com - Home of EEBlaster (EUR 49,-)
Reply