Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21324 Discussions

SPI Flash devices

Altera_Forum
Honored Contributor II
4,493 Views

I am looking for a SPI FLASH device to configure a Cyclone III device in AS mode. I know that other manufacturers make FLASH parts that are compatible with the Altera EPCSx series, but Altera does not officially support these other manufacturers. 

 

Can anyone reccomend a specific SPI FLASH device from a different manufacturer that has been used successfully to configure a Cyclone III? 

 

I am looking at the Numonyx M25P40, but there are a lot of other choices out there! 

 

Thanks.
0 Kudos
14 Replies
Altera_Forum
Honored Contributor II
2,118 Views

I have used both Numonyx M25P16 and M25P80 with Cyclone III successfully.  

 

The M25P80 can be problematic depending on which version of Quartus is used. The latest programming tools will generally refuse to program it even though it worked with older versions. With the newer versions of Quartus, I had to convert the JIC file to a JAM file. I could then edit the ID check in the JAM file to make it work. However, once I had my own Remote Update routines working, I didn't need to rely on the Altera tools anymore anyway.
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

EPCS ID check can be disabled in jic generation. Isn't that sufficient?

0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

I am using ST Microelectronics M25P16-VMF6P with C2. They are compatible with Altera EPCS devices.

0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

add a file called nios2-flash-override.txt and place it in folder ..\nios2eds\bin 

 

this file should have the following 

[epcs-010216]# epcs64n (spansion-lead-free) s25fl064a0lmfi001 

sector_size = 65536 

sector_count = 128 

 

 

This enables the Spansion S25FL064A0LMFI001 

i also successfully used several other parts and posted that at niosforum but these postings are lost :-(
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

 

--- Quote Start ---  

EPCS ID check can be disabled in jic generation. Isn't that sufficient? 

--- Quote End ---  

You would think that would work. However, whether I checked this option or not, the Quartus programmer would give an error about the ID. 

 

The fact that Altera seems to make it difficult and does not officially support using 3rd party serial configuration devices is a bit of a turn off to me. With Xilinx, they even have recommended alternatives to their configuration devices. In a cost sensitive application, being able to use a much cheaper 3rd party configuration device is a significant factor. Having no official support for this can be a bit worrying.
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

@ Kevin 

 

if that is a turn off for you, the price between Altera EPCS64 and Spansion S25FL064 might be a turn on for you. for us it was the main point not to use the altera devices. 

they are to expensive ! 

 

too bad that the nios forum lost the thread, there was a list what devices were working (without any modification)
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

 

--- Quote Start ---  

@ Kevin 

 

too bad that the nios forum lost the thread, there was a list what devices were working (without any modification) 

--- Quote End ---  

 

 

Michael, 

 

Have you searched the Google cache for the lost pages? I had a go and found a lot of threads (some by you) but wasn't sure which one you were referring to. Here's the content of one possibility: 

 

 

--- Quote Start ---  

 

Today i have replaced an Altera EPCS by a Spansion S25FL064A0LMFI001 

 

If, as mentioned bevore here, flash override has the following entry : 

 

[EPCS-010216]# EPCS64N (Spansion-lead-free) S25FL064A0LMFI001 

sector_size = 65536 

sector_count = 128 

 

I can successfully Blaster this device and will receive the following output : 

 

EPCS signature is 0x16 

EPCS identifier is 0x010216 

Using EPCS size information from section [EPCS-010216] 

Device size is 8MByte (64Mbit) 

Erase regions are: 

offset 0: 128 x 64K 

 

In Addition i have replace an EPCS16SI8N by Numonyx M25P16-VMN6P 

 

EPCS signature is 0x14 

EPCS identifier is 0x202015 

Using EPCS size information from section [EPCS-202015] 

Device size is 2MByte (16Mbit) 

Erase regions are: 

offset 0: 32 x 64K 

 

So M25P16-VMN6P is detected as EPCS16SI8N and can be blasterd too, what tells us that .... 

 

Thanks for all replies now i have some much cheaper first choices and a good proven Altera second source :-) 

 

Michael  

 

--- Quote End ---  

 

Cheers
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

 

--- Quote Start ---  

EPCS ID check can be disabled in jic generation. Isn't that sufficient? 

--- Quote End ---  

 

 

Sorry, dumb question, but what is JIC? Is disabling the EPCS ID Check something in the IDE or something done in code? 

 

 

--- Quote Start ---  

add a file called nios2-flash-override.txt and place it in folder ..\nios2eds\bin 

 

this file should have the following 

[epcs-010216]# epcs64n (spansion-lead-free) s25fl064a0lmfi001 

sector_size = 65536 

sector_count = 128 

 

 

--- Quote End ---  

 

 

Does adding a file like this for a particular SPI flash, work only if you're flashing an epcs via the Nios IDE, or will it work programmatically (i.e. via nios code) as well? 

 

Cheers!
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

this override file is only intended to be used with the command line nios2-flash-programmer --epcs but to honest i am unshure if the ide would also use it and might call nios2-flash-programmer as i do not use the ide. 

you need this if want to store your fpga and or application image into an epcs device that is not known to nios2-flash-programmer like the spansion type
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

I see.. I'm actually not thinking of using a SPI flash for fpga configuration but rather just a cheap way to store nv data. 

 

But in order to use the EPCS core with a spi flash from another vendor, I need to fake out that EPCS check, no?
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

The ID check is (if at all) performed by the programmer software, not the EPCS core.

0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

i'm trying to use the AT25FS010 ATMEL SPI FLASH so i insert the file  

nios2-flash-override.txt 

and within there is: 

 

[EPCS-1F6601]# EPCS1N (ATMEL SPI FLASH) S25FL064A0LMFI001 

sector_size = 4096 

sector_count = 32 

 

but the result is: 

 

[NiosII EDS]$ nios2-flash-programmer --epcs --base=0x00002000 "spi_flash.flash" --verbose 

Reading override file "c:/altera/90/nios2eds/bin/nios2-flash-override.txt" 

Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 

Resetting and pausing target processor: OK 

Processor data bus width is 32 bits 

Looking for EPCS registers at address 0x00002000 (with 32bit alignment) 

Initial values: 0001703A 04C00074 9801483A 9CFFF804 983FFD1E 0000203A 

Not here: reserved fields are non-zero 

Looking for EPCS registers at address 0x00002100 (with 32bit alignment) 

Initial values: 92400237 4A40100C 483FFD26 90000135 92400237 4A40200C 

Not here: reserved fields are non-zero 

Looking for EPCS registers at address 0x00002200 (with 32bit alignment) 

Initial values: 03803904 73C00136 00000406 03803C44 7BBF9336 03803DC4 

Not here: reserved fields are non-zero 

Looking for EPCS registers at address 0x00002300 (with 32bit alignment) 

Initial values: 00000000 00000000 00000000 00000000 00000000 00000000 

Not here: SPI_SLAVE_SEL has 0 valid bits (should be between 1 and 16) 

Looking for EPCS registers at address 0x00002400 (with 32bit alignment) 

Initial values: 00000000 00000000 00000260 00000000 00000000 00000001 

Valid registers found 

EPCS signature is 0x1F 

EPCS identifier is 0x1F6601 

Using EPCS size information from section [EPCS-1F6601] 

Device size is 128KByte (1Mbit) 

Erase regions are: 

offset 0: 32 x 4K 

EPCS status is 0x00 

: Checksumming existing contents 

00000000 : Verifying existing contents 

00000000 : Needs erase then program 

00001000 : Verifying existing contents 

00001000 : Needs erase then program 

00002000 : Verifying existing contents 

00002000 : Needs erase then program 

00003000 : Verifying existing contents 

00003000 : Needs erase then program 

00004000 : Verifying existing contents 

00004000 : Needs erase then program 

00005000 : Verifying existing contents 

00005000 : Needs erase then program 

00006000 : Verifying existing contents 

00006000 : Needs erase then program 

00007000 : Verifying existing contents 

00007000 : Needs erase then program 

00008000 : Verifying existing contents 

00008000 : Needs erase then program 

00009000 : Verifying existing contents 

00009000 : Needs erase then program 

0000A000 : Verifying existing contents 

0000A000 : Needs erase then program 

0000B000 : Verifying existing contents 

0000B000 : Needs erase then program 

0000C000 : Verifying existing contents 

0000C000 : Needs erase then program 

0000D000 : Verifying existing contents 

0000D000 : Needs erase then program 

0000E000 : Verifying existing contents 

0000E000 : Needs erase then program 

00000000 : Reading existing contents 

00001000 : Reading existing contents 

00002000 : Reading existing contents 

00003000 : Reading existing contents 

00004000 : Reading existing contents 

00005000 : Reading existing contents 

00006000 : Reading existing contents 

00007000 : Reading existing contents 

00008000 : Reading existing contents 

00009000 : Reading existing contents 

0000A000 : Reading existing contents 

0000B000 : Reading existing contents 

0000C000 : Reading existing contents 

0000D000 : Reading existing contents 

0000E000 : Reading existing contents 

Checksummed/read 1kB in 0.0s 

00000000 ( 0%): Erasing 

Erase failed at offset 0 

Leaving target processor paused 

 

did i miss some steps?
0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

Do you know, if the NIOS programmer is able to handle the 4K sector erase in constrast to 32k block erase? The latter should work at least, because the Atmel device is compatible to EPCS1 when using large blocks.

0 Kudos
Altera_Forum
Honored Contributor II
2,118 Views

the binary code looks different. The Atmel needs 2 Bytes and the first one is different.

0 Kudos
Reply