Forum Discussion
How do I use N25Q512 Quad-SPI Flash, instead of ECPQ512?
I have a board designed to boot the Cyclone V FPGA from AS Flash, using a N25Q512A13G1240E chip instead of Altera's EPCQ512. (NB: This is a product, not a dev-kit)
However, in Quartus Prime, the Programmer's "Convert Programming File" dialog only has the option of choosing EPCQ512 when generating the JIC file. When this JIC file is used to JTAG program the FLASH via the FPGA, it fails with the following message: "Error (209025): Can't recognize silicon ID for device 2. A device's silicon ID is different from its JTAG ID. Verify that all cables are securely connected, select a different device, or check the power on the target system. Make sure the device pins are connected and configured correctly." Presumably this is because Quartus reads back the ID of the N25Q512, and it doesn't match that of a EPCQ512. Any ideas of how to get around this? I think the Altera SoC Development board uses similar FLASH to mine, so presumably there must be some sort of work-around for this. NB: I am trying to configure the FPGA with this flash chip, not boot the ARM processor from it. (One step at a time!)30 Replies
- Altera_Forum
Honored Contributor
The Quad SPI flash chip isn't on the JTAG chain. You need to follow the instructions for programming a quad SPI chip, not a JTAG based chip. There are some app notes as well as a section in the Altera programmer manual that explain how this works.
- Altera_Forum
Honored Contributor
--- Quote Start --- The Quad SPI flash chip isn't on the JTAG chain. You need to follow the instructions for programming a quad SPI chip, not a JTAG based chip. There are some app notes as well as a section in the Altera programmer manual that explain how this works. --- Quote End --- Erm, yes I know the Quad SPI flash chip isn't in the JTAG chain, that's why I said I was programming it via the FPGA. When the JIC file is loaded, it is sets the JTAG programmer to load the FPGA with the "Factory Default Enhanced" image, and then the flash chip itself with the JIC image. When run, it successfully loads the FPGA with the "Factory Default Enhanced" image, the CONF_DONE pin goes high. Then the JTAG it tries to send the JIC file to the "Altera serial flash loader" core instantiated by that FPGA image, in order for that to be able to program it into the QSPI chip attached to the FPGA. That's when it fails. AN370 etc are fine, but they do not address the specific problem of how to program the chip I have rather than then Altera's own EPCQ512. See below image, http://www.alteraforum.com/forum/attachment.php?attachmentid=11678&stc=1 - Altera_Forum
Honored Contributor
Somewhere in the back of my mind I recall a setting in Quartus to "ignore silicon ID" when programming a configuration device.
- Altera_Forum
Honored Contributor
Sorry for the misunderstanding.
You don't seem to have the flash loader. Did you select Mode: "Active Serial x4" in the convert programming files dialog? Also, under Advanced... select both "Disable EPCS/EPCQ ID check" and "Disable AS mode CONF_DONE error check", these should already be checked by default. Back on the main dialog, highlight "SOF Data" before clicking "Add file..." Note that the setting EPCQ256 works even for a micron quad spi serial flash. - Altera_Forum
Honored Contributor
I realized I didn't answer the question you were asking about how to load the jic file!
1) After creating your jic file, open the programmer and make sure your board shows up in hardware. 2) Select Mode: JTAG and click auto Detect. Choose your FPGA if a "Select Device" dialog shows up. 3) Click your FPGA in the JTAG chain. Then right click and choose "Change File" It won't work if you pick Add file. 4) Select your jic file in the file dialog. you can skip the next steps if you are sure your quad SPI serial flash is already erased. 5) Check Program/Configure for the flash programmer and select erase for the jic file. 6) Click Start and wait for the chip to erase. This can take several minutes so don't worry. To load the serial flash 7) Uncheck erase for your jic file and check Program/Configure 8) Click start again to program the serial flash - Altera_Forum
Honored Contributor
--- Quote Start --- I realized I didn't answer the question you were asking about how to load the jic file! 1) After creating your jic file, open the programmer and make sure your board shows up in hardware. 2) Select Mode: JTAG and click auto Detect. Choose your FPGA if a "Select Device" dialog shows up. 3) Click your FPGA in the JTAG chain. Then right click and choose "Change File" It won't work if you pick Add file. 4) Select your jic file in the file dialog. you can skip the next steps if you are sure your quad SPI serial flash is already erased. 5) Check Program/Configure for the flash programmer and select erase for the jic file. 6) Click Start and wait for the chip to erase. This can take several minutes so don't worry. To load the serial flash 7) Uncheck erase for your jic file and check Program/Configure 8) Click start again to program the serial flash --- Quote End --- Dear Galfonz, Thanks, at least that confirms that I am doing the correct procedure. The erase works ok (or claims to at least). However the last step still fails with the following error: Error (209025): Can't recognize silicon ID for device 2. A device's silicon ID is different from its JTAG ID. Verify that all cables are securely connected, select a different device, or check the power on the target system. Make sure the device pins are connected and configured correctly. Error (209012): Operation failed This is despite selecting both "Disable EPCS/EPCQ ID check" and "Disable AS mode CONF_DONE error check", which you would have thought would have made it disregard the silicon ID. See below image of the JIC options selected: http://www.alteraforum.com/forum/attachment.php?attachmentid=11680&stc=1 - Altera_Forum
Honored Contributor
Judging by your JTAG chain, you seem to be using a cyclone V SoC chip. However, in your Convert Programming File dialog, the BSP_DUAL.sof file seems to be for a 5CSE (Not SoC) chip. This is the mismatch that it is complaining about, not the serial flash. The SoC chip should be either 5CST or 5CSX. Your bitstream file was created for the wrong FPGA. You need to build the sof file for 5CST or 5CSX.
- Altera_Forum
Honored Contributor
--- Quote Start --- Judging by your JTAG chain, you seem to be using a cyclone V SoC chip. However, in your Convert Programming File dialog, the BSP_DUAL.sof file seems to be for a 5CSE (Not SoC) chip. This is the mismatch that it is complaining about, not the serial flash. The SoC chip should be either 5CST or 5CSX. Your bitstream file was created for the wrong FPGA. You need to build the sof file for 5CST or 5CSX. --- Quote End --- Nope, the 5CSE is definitely a SoC chip, it just doesn't have the high-speed transceivers that the 5CST or 5CSX parts do. http://www.alteraforum.com/forum/attachment.php?attachmentid=11681&stc=1 My full part number is the 5CSEBA5U23I7-N, which is a Cyclone V SoC, 85K Luts, UBGA 672 pins, Industrial Temp, with Dual-Core ARM-9 Processor (Lead-free) - Altera_Forum
Honored Contributor
Oh, is it a new model? I don't recall an SE version. I wonder if Altera has tested programming a quad spi chip for that series.
What you've tried should have worked. I've been able to program the quad SPI on my SoCKit board using the instructions in the SoCKit user manual. It is a 256K chip. Most projects use HPS to program the FPGA. Have you checked power supplies and clocks? These can prevent configuration. Is the HPS side working? - Altera_Forum
Honored Contributor
--- Quote Start --- Oh, is it a new model? I don't recall an SE version. I wonder if Altera has tested programming a quad spi chip for that series. What you've tried should have worked. I've been able to program the quad SPI on my SoCKit board using the instructions in the SoCKit user manual. It is a 256K chip. Most projects use HPS to program the FPGA. Have you checked power supplies and clocks? These can prevent configuration. Is the HPS side working? --- Quote End --- I chose the FPFA part number about 12 months ago. The power supplies are all ok. I can't readily probe the DCLK clock under the flash chip BGA. It should be 12.5MHz, generated by the internal clock oscillator. (Is that the only clock you were referring to?) I suspect an incompatibility bug between the Micron QSPI chip and the Quartus software. In which case I might eventually have to write my own programmer software. That could take a very long time, so I will park this problem for now, and try a different technique, which is to write HPS code and try and configure the FPGA from the HPS. The HPS can boot from an SD card. Altera have a financial interest in selling their own QSPI chips, so I can't imagine they will rush to support the Micron parts, which sell for about a tenth the cost. If I find an actual solution I will post the results here.