adamada 0 Report post Posted April 21, 2017 Hi. So I'm a student at Binghamton University's EECE department. We use the Papilio Duo boards (plus the LogicStart shield, but that's not relevant) for our design courses. I (and many others in my class) have been having an issue with writing FPGA bit files to the persistent SPI flash memory. Using Papilio Loader (or even papilio-prog) to write to the FPGA directly works fine, but it needs to stay plugged into the computer, and it loses the program when you disconnect the power. When I try to write to SPI Flash, the program output does not indicate any problems. It indicates it could erase, verify erase, write, and verify successfully. But then nothing functions, even when I remove and reapply power. It starts working again when I load the file to FPGA directly. I have tried this using multiple computers (Linux, Windows, OS X) and I still have this problem. I have tried both SW1 positions to no avail, I have tried pressing the "FPGA Reset" button, and I have tried triggering an FPGA reconfiguration using papilio-prog. Nothing seems to help. Is there a known fix for this, or should I contact support to request an exchange? Note that I was able to program to SPI Flash successfully until about a month ago. (I can't think of anything that should have caused this change). Thanks. Share this post Link to post Share on other sites
alvieboy 25 Report post Posted April 21, 2017 You can try using ZPUino itself to perform the SPI programming. Let me know if you need some pointers on how to do it. Contact me at alvieboy@alvie.com Alvaro Share this post Link to post Share on other sites
adamada 0 Report post Posted April 21, 2017 So I downloaded DesignLab and it seems I can load the ZPUino QuickStart circuit and sketch onto my board from the examples, and it stays persistent when I reconnect power. So I guess the SPI flash is not totally broken. But my school isn't using the Spartan 6 for ZPUino at all. We have been using Xilinx ISE projects, generating bit files, and using the Papilio Loader to get them onto our boards. I don't believe the best solution should be to just stop using that toolchain all together. Share this post Link to post Share on other sites
adamada 0 Report post Posted April 21, 2017 Here some additional information: I wanted to see if I could use DesignLab to upload bit files generated in ISE. So I went into the Libraries directory and created a library called custom. I imitated the directory structure of the other libraries, so my bit file was at "C:\DesignLab-1.0.8\libraries\custom\circuit\DUO_LX9\papilio_duo_lx9.bit". Then I loaded a blank sketch template and changed the line #define circuit blank to #define circuit custom and pressed upload. The console indicated it was uploading the proper file to SPI, but then once everything was done, nothing worked as it was supposed to (the same symptom when using Papilio Loader to SPI and not directly to FPGA). So this is really weird. Writing to persistent flash works with the example .bit files that come with DesignLab, but not with my own .bit files made in ISE. This is not a vital issue for my current project, because I was able to load the blank circuit onto SPI so that the AVR reset was not constantly on high. So now I can use the 32u4 chip, which is the only one my currently assigned project uses. But if I want to use the FPGA chip again, I'm still no further than I was before I posted here: writing to FPGA works, but no program I use can get my own bit files to write to SPI. Share this post Link to post Share on other sites
Jack Gassett 0 Report post Posted April 27, 2017 Hello adamada, You should check all of your configuration settings. The easiest way to do that is to open the *.xise file and compare it to an xise file that is successfully generating a bit file that loads to spi flash. You have probably accidentally set the configuration to a quad spi chip or something... Jack. Share this post Link to post Share on other sites
anirbax 0 Report post Posted January 9, 2018 Hi adamada, After programming the SPI flash, you need to power cycle (remove power and then connect power back again). Took me some time to figure out :-) --Anirban Share this post Link to post Share on other sites