Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16593 Discussions

How do I use N25Q512 Quad-SPI Flash, instead of ECPQ512?

Altera_Forum
Honored Contributor II
9,862 Views

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!) 

 

 

 

0 Kudos
29 Replies
Altera_Forum
Honored Contributor II
2,932 Views

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.

0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

 

--- 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
0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

Somewhere in the back of my mind I recall a setting in Quartus to "ignore silicon ID" when programming a configuration device.

0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

 

--- 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
0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

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.

0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

 

--- 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)
0 Kudos
Altera_Forum
Honored Contributor II
2,932 Views

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?
0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

 

--- 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.
0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

I'm out of ideas on this as well. I have successfully programmed a micron 26Q256A quad spi chp on my SoCKit board. My previous posting is from my notes on how to do it. It may be that the programmer doesn't like the 512k version.

0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

 

--- Quote Start ---  

I'm out of ideas on this as well. I have successfully programmed a micron 26Q256A quad spi chp on my SoCKit board. My previous posting is from my notes on how to do it. It may be that the programmer doesn't like the 512k version. 

--- Quote End ---  

 

 

It's not going to be my day (see attached Errata)
0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

Bummer....

0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

 

--- Quote Start ---  

It's not going to be my day (see attached Errata) 

--- Quote End ---  

 

 

I come back to this issue which can be interesting to me if I would like to replace and EPCQL by a SPI MICRON Flash. 

 

If the "ASx4 mode" is not supported by the EPCQ512, have you tried the "ASx1 mode" configuration ? 

If the PCB, hardware is designed to support the ASx4 it should work with the ASx1 configuration. In that case only one SPI Data line is used instead 4 and the configuraton time will be slower.
0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

 

--- Quote Start ---  

I come back to this issue which can be interesting to me if I would like to replace and EPCQL by a SPI MICRON Flash. 

 

If the "ASx4 mode" is not supported by the EPCQ512, have you tried the "ASx1 mode" configuration ? 

If the PCB, hardware is designed to support the ASx4 it should work with the ASx1 configuration. In that case only one SPI Data line is used instead 4 and the configuraton time will be slower. 

--- Quote End ---  

 

 

 

Hi, 

Yes, I tried x1 mode with the N25Q512, but the Quartus Prime programming software wouldn't work as you can't select micron chips in that software. 

I can't discount their (also) being a problem with my custom hardware which is preventing this from working. 

 

I can't comment on whether the EPCQ512 would work in x1 mode as I don't have that chip fitted, but as that is an Altera chip then I would expect that workaround to work with the Altera software. 

 

As a slight aside, the new SoCrates II dev-board from EBV is listed as being fitted with N25Q256, so it will be interesting to see how they program those chips! 

If they are going to production with the N25Q256, then I would have though that you should be pretty safe using that chip too. (usual disclaimer apply!) 

Ref: http://www.ebv.com/products/product-details/9956/ 

 

The only difference I can see is that N25Q512 is a dual-die flash chip, whereas the N25Q256 is a single-die flash chip. 

This difference may or may-not be the reason why I can't program the N25Q512 on my board using the Quartus Prime programming software. 

 

I asked for technical support from Altera and they (using polite corporate language) told me and my company to get knotted. 

They just want everyone to carry on buying Altera EPCQ chips at 20x the cost of the Micron N25Q chips. 

 

For now I am trying to configure the FPGA from the SD-Card attached to the HPS side of the chip. (which is a different can of worms!) 

Time permitting I will write my own QSPI programming software and get to the bottom of why my N25Q512 won't work with the Quartus Prime programming software. 

This would download the configuration file (via a serial port) to a NIOS-II configured via JTAG. The NIOS-II would store the configuration file in SDRAM, then check the CRC, and then program that file into the N25Q512 using Micron's 'C' libraries.
0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

There is an official partner program between MICRON and ALTERA : https://www.micron.com/solutions/micron-valued-partner-program/chipset-partner/altera 

 

And if you look at the section "Download Micron Flash and DRAM support for Altera Platforms", the SPI NOR Flash N25Q is validated for Cyclone V. But I don' know what means "validated" : boot from MICRON FLASH or program FLASH also through Quartus tool....
0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

 

--- Quote Start ---  

There is an official partner program between MICRON and ALTERA : https://www.micron.com/solutions/micron-valued-partner-program/chipset-partner/altera 

 

And if you look at the section "Download Micron Flash and DRAM support for Altera Platforms", the SPI NOR Flash N25Q is validated for Cyclone V. But I don' know what means "validated" : boot from MICRON FLASH or program FLASH also through Quartus tool.... 

--- Quote End ---  

 

 

Yes, we fell for that marketing spin, and designed-in two Micron (BGA) flash chips (for FPGA and HSP boot), only to be told that Altera won't support programming them, won't help us debug the problem, won't confirm or deny whether there is a technical reason why the N25Q512 will or won't work with the Cyclone V. Then they just told us to go away and re-layout the board for EPCQ512 (SOIC) chips. 

Even if the EPCQ512 were available from any distributor the UK, they would still add £200 to the BOM and thereby make the product unsaleable. 

 

I no longer trust Altera. 

My direct experience is that unless your product is going to sell >100K units, you get no support and you are on your own.
0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

Ouch! Thanks for the heads-up.

0 Kudos
Altera_Forum
Honored Contributor II
2,931 Views

I'm facing similar problems trying to use a Macronix flash. 

 

I found useful information in an app note by Cypress for their alternates. Google AN98558 and have a look at section 3.2 onwards. You may be able to program using nios2flash even though Quartus refuses to do the job.
0 Kudos
Altera_Forum
Honored Contributor II
2,811 Views

 

--- Quote Start ---  

I'm facing similar problems trying to use a Macronix flash. 

 

I found useful information in an app note by Cypress for their alternates. Google AN98558 and have a look at section 3.2 onwards. You may be able to program using nios2flash even though Quartus refuses to do the job. 

--- Quote End ---  

 

 

Thanks, very interesting. I'll look into it.
0 Kudos
Reply