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++
12606 Discussions

How to rebuild a lost CFI table

Altera_Forum
Honored Contributor II
1,303 Views

When I tried to download my design in to the Nios2 board, I got the "No CFI table found at address 0x01000000" error from the Nios2 IDE. I followed the instructions in the User Guide of Programmer and obtained the following message from the command line programmer tool: 

 

 

/cygdrive/e/altera/kits/nios2_60/examples 

[SOPC Builder]$ nios2-flash-programmer.exe --debug --base=0x01000000 

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Resetting and pausing target processor: OK 

No CFI table found at address 0x01000000 

Original contents (after writing 0xF0 and 0xFF to address 0x01000000): 

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 0x010000AA: 

Same after writing 0x0098 to address 0x01000154: 

Same after writing 0x00000098 to address 0x010002A8: 

Same after writing 0x98 to address 0x01000055: 

Same after writing 0x0098 to address 0x010000AA: 

Same after writing 0x00000098 to address 0x01000154: 

Same after writing 0x98 to address 0x01000154: 

Same after writing 0x0098 to address 0x010002A8: 

Same after writing 0x00000098 to address 0x01000550: 

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 

/cygdrive/e/altera/kits/nios2_60/examples 

[SOPC Builder]$ 

 

I downloaded the data sheet of the Am29LV065D Flash chip from www.alldatasheet.com and found that the entire CFI table is missing. From the data sheet, I learned how should the CFI table look like, but I don't know how to rebuild it or what tool should I use?? 

 

Please help!! Thank you very much!!!!
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
588 Views

i can't tell you how to fix the cfi but i can give you a hint what i do in these cases ... 

 

it seems to me that the cfi is not lost. mostly there is something wired going on with the currently running nios design. so i download the fpga by using the *.cdf and then i have a properly running nios2 then i imediatly run the flash prommer again and can program the flash. .... 

 

$QUARTUS_ROOTDIR/bin/quartus_pgm --cable='USB-Blaster [USB-0]' EP2C50.cdf 

 

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --cable='USB-Blaster [USB-0]' --device=1 --base=0x00000000 EP2C50.flash 

 

no idea why i need to load the fpga image and not using the currently running nios. both images are the same ! the one running and the one from *.cdf 

 

maybe you can give this a try .. 

 

Regards. 

 

Michael
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

Michael, 

 

I don't understand why that should make a difference either. As you said, both images should be the same. However, it seemed to make a difference for me also.
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

I hope you'll forgive the thread necromancy, but I'm having an identical problem. I tried the CLI commands as MSchmitt suggested, but I'm still getting the same error about a CFI table not being found. 

 

Could anyone suggest another course of action? Thanks in advance http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

 

--- Quote Start ---  

originally posted by benway@Jan 24 2007, 10:47 AM 

i hope you&#39;ll forgive the thread necromancy, but i&#39;m having an identical problem. i tried the cli commands as mschmitt suggested, but i&#39;m still getting the same error about a cfi table not being found. 

 

could anyone suggest another course of action?  thanks in advance http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20833) 

--- quote end ---  

 

--- Quote End ---  

 

 

Yes. Don&#39;t use the flash programmer, but rather the Memory Test software example (or the like) to ensure that your CFI interface is working, correctly, first. You&#39;ll likely run into problems getting this to work. Be sure to double check your pinout and the constraints you&#39;ve placed on the SOPC Builder CFI peripheral. If all else fails, start using SignalTap to debug your design....  

 

Oh yeah, and be sure you&#39;re not basing your failure on a one board sample. You could just have a bad flash or some sort of board failure. 

 

Cheers, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

 

--- Quote Start ---  

originally posted by slacker@Jan 24 2007, 07:40 PM 

yes.  don&#39;t use the flash programmer, but rather the memory test software example (or the like) to ensure that your cfi interface is working, correctly, first.  you&#39;ll likely run into problems getting this to work.  be sure to double check your pinout and the constraints you&#39;ve placed on the sopc builder cfi peripheral.  if all else fails, start using signaltap to debug your design....  

 

oh yeah, and be sure you&#39;re not basing your failure on a one board sample.  you could just have a bad flash or some sort of board failure. 

 

cheers, 

 

- slacker 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20840) 

--- quote end ---  

 

--- Quote End ---  

 

Thanks for the reply. I followed your suggestions, and you&#39;re right - the memory test couldn&#39;t even locate the flash device (I specified all the possible paths I could think of). I&#39;m using different boards in the lab every time, so I don&#39;t think it&#39;s a hardware failure. I also double-checked my top-level entity and pin assignments and I can&#39;t find any glaring errors, then again I might still be missing something. :/
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

 

--- Quote Start ---  

originally posted by benway@Jan 30 2007, 11:30 AM 

thanks for the reply.  i followed your suggestions, and you&#39;re right - the memory test couldn&#39;t even locate the flash device (i specified all the possible paths i could think of).  i&#39;m using different boards in the lab every time, so i don&#39;t think it&#39;s a hardware failure. i also double-checked my top-level entity and pin assignments and i can&#39;t find any glaring errors, then again i might still be missing something. :/ 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=21035) 

--- quote end ---  

 

--- Quote End ---  

 

 

Be sure to double check your settings in the SOPC Builder component. Also, just as an aside, has this ever worked in the past? Or, are you just starting to attempt this on a new(ish) board? If it&#39;s the latter, you need to double check everything....and, don&#39;t just run the memory test example, but actually step through the CFI initialization routine to see exactly where it&#39;s failing.... Then, perhaps, it makes sense to use Signal Tap to help narrow the problem down. 

 

Good luck, and welcome to the wonderful world that is the CFI flash "standard". 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

 

--- Quote Start ---  

originally posted by slacker@Jan 30 2007, 06:00 PM 

be sure to double check your settings in the sopc builder component.  also, just as an aside, has this ever worked in the past?  or, are you just starting to attempt this on a new(ish) board?  if it&#39;s the latter, you need to double check everything....and, don&#39;t just run the memory test example, but actually step through the cfi initialization routine to see exactly where it&#39;s failing....  then, perhaps, it makes sense to use signal tap to help  narrow the problem down. 

 

good luck, and welcome to the wonderful world that is the cfi flash "standard". 

 

- slacker 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=21043) 

--- quote end ---  

 

--- Quote End ---  

 

I haven&#39;t personally used it in the past, but a TA tells me that he&#39;s gotten it to work before, but he is stumped with this problem. We are using the Altera DE2 board, for what it&#39;s worth. If this is the CFI club initiation, I&#39;m not sure I even want to be a member anymore http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/unsure.gif
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

There should be nothing special about CFI flash. 

 

We created a new board and implemented CFI flash support from Quartus command line tools to uCLinux in a few weeks. 

 

IzI
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

Well it turns out my flash wasn&#39;t responding because FL_RST_N wasn&#39;t set. Talk about bonehead mistakes http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif

0 Kudos
Altera_Forum
Honored Contributor II
588 Views

Well done and welcome to the club http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

IzI
0 Kudos
Reply