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

SPI flash

Altera_Forum
Honored Contributor II
1,623 Views

Does anybody know if "Nios II flash programmer" support SPI flashes compatible with EPCS devices? 

Thanx in advance
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
582 Views

 

--- Quote Start ---  

Does anybody know if "Nios II flash programmer" support SPI flashes compatible with EPCS devices? 

Thanx in advance 

--- Quote End ---  

 

 

Yes it does.
0 Kudos
Altera_Forum
Honored Contributor II
582 Views

Thanx anakha for your quick reply!  

I have some problem with my SPI flash; I'm using an Spansion S25FL204K0TMFI04, it works in active serial mode and my FPGA loads correctly from it, but when I try to program it with the "NIOS II flash programmer" I receive the following messages: 

 

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 0x00011000 (with 32bit alignment) 

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

Not here: reserved fields are non-zero 

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

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

Not here: reserved fields are non-zero 

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

Initial values: 108001C4 1004D0FA 002EE03A 003F9C06 002EE03A 003F9506 

Not here: reserved fields are non-zero 

Looking for EPCS registers at address 0x00011300 (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 0x00011400 (with 32bit alignment) 

Initial values: 00000000 00000000 00000260 00000000 00000000 00000001 

Valid registers found 

EPCS signature is 0x12 

EPCS identifier is 0x014013 

No EPCS layout data - looking for section [EPCS-014013] 

Unable to use EPCS device 

Leaving target processor paused 

 

Do you have any ideas? 

Thanx in advance
0 Kudos
Altera_Forum
Honored Contributor II
582 Views

By default the nios FLASH programmer doesn't recognise all serial FLASH parts. 

 

You need to create a "nios2-flash-override.txt" file in your ../nios2eds/bin installation directory. By identifying the size and number of sectors a device has this file tells the programmer how to handle serial FLASH parts whose device ID it doesn't recognise. 

 

In your new "nios2-flash-override.txt" file paste the following: 

sector_size = 65536 sector_count = 8 

 

The FLASH programmer will now know how to handle your Spansion part. 

 

Regards, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
582 Views

Yes it works!!! 

thank u a_x_h_75, u r great!! :))
0 Kudos
Reply