Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12690 Discussions

S29AL008J Issue: Flash is not working

Altera_Forum
Honored Contributor II
1,545 Views

I have found few or no information about the compliant of the following Spansion flash memory model: S29AL008J. 

Have any one already used it ? 

I am using exactly the model S29AL008J70TFI01. 

Its byte (8 bits) or word (16 bits) selectable through pin BYTE#. 

The IC is connected as bellow 

 

BYTE = 3V3 (word mode) 

[A0~A18] of IC connected to nios ADDRESS[1~19] - once the memory is configured as a 16 bits memory 

DQ0 DQ15 connected to DATA[0~15] from nios 

CE#, OE# and WE# connected directly to nios 

RESET# is the same used with Nios reset# input. 

WP# is floating (its internally pull up), so, there is no write protection to the first block. 

 

nios cfi memory is configured as bellow 

custom 

19 bits (address) 

16 bits (data) 

70 (setup) 160 (wait) 70 (hold). 

 

Executing command: bin/elf2flash --input="C:/Workspace/quartus/FNIOS/SOFTWARE/teste/teste.elf" --output="C:/Workspace/quartus/FNIOS/SOFTWARE/teste_bsp/flash/teste_ext_flash.flash" --boot="components/altera_nios2/boot_loader_cfi.srec" --base=0x0 --end=0x100000 --reset=0x0 --verbose 07/01/2011 18:43:30 - (INFO) elf2flash: args = --input=C:/Workspace/quartus/FNIOS/SOFTWARE/teste/teste.elf --output=C:/Workspace/quartus/FNIOS/SOFTWARE/teste_bsp/flash/teste_ext_flash.flash --boot=components/altera_nios2/boot_loader_cfi.srec --base=0x0 --end=0x100000 --reset=0x0 --verbose 07/01/2011 18:43:30 - (FINE) elf2flash: Starting 07/01/2011 18:43:30 - (FINER) elf2flash: Program Record: 6120 bytes destined for 0x110020 07/01/2011 18:43:30 - (FINER) elf2flash: Start Record: 110184 07/01/2011 18:43:30 - (FINE) elf2flash: Done Executing command: bin/nios2-flash-programmer "C:/Workspace/quartus/FNIOS/SOFTWARE/teste_bsp/flash/teste_ext_flash.flash" --base=0x0 --sidp=0x2000060 --id=0x7C4D57F --timestamp=1294432172 --device=1 --instance=0 '--cable=USB-Blaster on localhost ' --program --verbose Using cable "USB-Blaster ", device 1, instance 0x00 Resetting and pausing target processor: OK Reading System ID at address 0x02000060: verified No CFI table found at address 0x00000000 Original contents (after writing 0xF0 and 0xFF to address 0x00000000): 0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ Contents after writing 0x98 to address 0x000000AA: Same after writing 0x0098 to address 0x00000154: Same after writing 0x00000098 to address 0x000002A8: Same after writing 0x98 to address 0x00000055: Same after writing 0x0098 to address 0x000000AA: Same after writing 0x00000098 to address 0x00000154: Same after writing 0x98 to address 0x00000154: Same after writing 0x0098 to address 0x000002A8: Same after writing 0x00000098 to address 0x00000550: 0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ Leaving target processor paused  

 

I have already tried to use bigger values for hold time / wait and setup (all of them with a value of 200 ns) with no success. 

 

Have anyone a idea about what could be the problem ? If needed I can provide more information. 

 

Thank you !
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
453 Views

Hi, 

Have you tried to use an "override" file

look at my posts http://www.alteraforum.com/forum/showpost.php?p=106271&postcount=1 , I gave an example. But it's still not working for me, so I take other flash. 

 

Look at flash programmer .pdf on altera web site too : http://www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf?gsa_pos=1&wt.oss_r=1&wt.oss=flash%20programmer

 

I hope it helps you. 

Regards.
0 Kudos
Altera_Forum
Honored Contributor II
453 Views

Hi, I got the same problem before, my solution is to set the timing of CFI(while building CFI in SOPC) setup, wait and hold...The required timing can be found in the data sheet...

0 Kudos
Altera_Forum
Honored Contributor II
453 Views

It's now working. 

The main problem was in the welding. After some checking using a microscope were enough to find some issues. 

 

After reading a little I thought that it could not have a standart cfi table, however as it's said in cfi controller manual, it's compatible with intel / amd cfi formats (and it's the case). 

About the problem with mmTsuchi, have you thought in check the welding or to exchange it with a new one ? It's strange it stop working after a long time using it... 

 

About the timings I think it's not so easy to understand, the detailing of the manuals is very deep (many timing values to be merged in order to have the CFI parameters). 

 

Thanks for your help !
0 Kudos
Altera_Forum
Honored Contributor II
453 Views

where can I find the override file to edit it please ? 

 

I have the same problem, "can't find CFI table" when trying to load .Elf file to the flash. 

Also, I cannot open the flash device when I tried to run MEMTEST program. 

 

Thanks in advance for your answer.
0 Kudos
Altera_Forum
Honored Contributor II
453 Views

@Rosetto, thanks for answer. Didn't look at weldings with microscope. 

 

@Metalous : You have to create yourself the override file and you need the datasheet. It is explained in altera flash programmer user guide (with an example). Not very obvious! 

To test flash, the flash must be free memory (no program, no assigned to reset vector...) 

Look at the name you gave to the flash.
0 Kudos
Reply