MiniSpartan6+ SPI Programming

From Hamsterworks Wiki!

Jump to: navigation, search

This FPGA Project was completed in Jan 2015.

I didn't know how to write a design's bit file into the configuration flash on the miniSpartan6+. I asked really nicely and Wayne Booth put a video together showing how to do it at https://www.youtube.com/watch?v=PdLXl3TnvZY

I've followed his instructions, and here is a summary of it.

You need a special bit file to connect the JTAG interface to the SPI chip for programming. You can build it from scratch using the source included in the XC3SPROG utility.

However, the Windows build doesn't include the files that are needed. To help others out I've made the required files for both versions of the board - note the file to use must match your board's FPGA!

File:Bscan spi s6lx25 ftg256.zip

File:Bscan spi s6lx9 ftg256.zip

Unlike in the video, to build these I did not need to include "bscan_common.v" - it just wasn't there!

Once you have that file handy you then have to program the FPGA twice - once to connect the SPI FLASH to the JTAG, and then follow that up with the program that is to be written to the SPI Flash chip.

Important note: For the second time you must include the -I switch!

C:\Users\hamster\Projects\FPGA\miniSpartan6\bscan>xc3sprog.exe -c FTDI bscan_spi_s6lx25_ftg256.bit
XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Windows
Free software: If you contribute nothing, expect nothing!
Feedback on success/failure/enhancement requests:
        http://sourceforge.net/mail/?group_id=170565
Check Sourceforge for updates:
        http://sourceforge.net/projects/xc3sprog/develop

Could not open FTDI device (using libftdi): device not found
Using FTD2XX,
DNA is 0x59053cd979af87fe

C:\Users\hamster\Projects\FPGA\miniSpartan6\bscan>xc3sprog.exe -c FTDI -I dvid_thru.bit

XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Windows
Free software: If you contribute nothing, expect nothing!
Feedback on success/failure/enhancement requests:
        http://sourceforge.net/mail/?group_id=170565
Check Sourceforge for updates:
        http://sourceforge.net/projects/xc3sprog/develop

Could not open FTDI device (using libftdi): device not found
Using FTD2XX,
JEDEC: c2 20 0x17 0xc2
Found Macronix MX25L Device, Device ID 0x2017
256 bytes/page, 262144 pages = 67108864 bytes total
Verify: Success!

Now if you remove and re-apply power the FPGA will configure from the design stored in flash.

Many thanks Wayne!

Personal tools