Forum Discussion
Altera_Forum
Honored Contributor
13 years agoFailed to program flash
Hello everyone,
Sorry about my poor english, i've developped a FPGA board which has a SST39VF6401B (Microchip flash), i'm using SOPC to configure the FPGA. I use Nios II to program flash (only blink leds) but when program flash, the only error is "no cfi table found". I also run program on the SD RAM to make sure my FPGA, RAM and JTAG still fine. Can anyone solve this problem or any suggestions? Thank you very much and best regards13 Replies
- Altera_Forum
Honored Contributor
Probably Altera HAL driver doesn't support your flash memory.
AFAIK support is provided for Intel, AMD and Spansion flash chips. In this case I think you'd only need a minor change in the driver in order to identify SST39VF6401B chip and properly access its CFI table. - Altera_Forum
Honored Contributor
Hello Cris72,
Thank you for replying me, i'm newbie. I also change into S29AL032D flash, and change some schematics (pull-up resistor 4k7 to pin WP# and BYTE#) to be suitable older design (using 16 bit data), but I have the same error ("no cfi table found"), i'm using FPGA EP3C25 (Cyclone III). Could you tell me how to change in the driver? or solve the second problem? Thanks very much - Altera_Forum
Honored Contributor
In such situations I'd try to manually access the flash device with IORD/IOWR and check if the hw interface is working as expected.
Read the flash datasheet: a few IOWR and IORD are used to get basic flash information, like vendor and product Id and this is enough to exclude major errors in design. - Altera_Forum
Honored Contributor
Dear Cris72,
Thanks for your advices but my situation is that i can't program flash via JTAG ("No CFI table found"), i also use S29AL032D flash with 16 bit data, its has the same problem. I wonder that there are something different in SOPC between Cyclone III and Cyclone II or between S29AL032D 8 bit data and 16 bit data. I have built a project for DE2 kit, it's worked fine in programming flash (S29AL032D 8 bit data). Do you have any ideas? - Altera_Forum
Honored Contributor
Hi Cris72,
Now I can program to flash S29AL032D mode 16 bit data, but the program can't run when i push reset button. Do you have any suggestions? - Altera_Forum
Honored Contributor
anyone can help me please!
- Altera_Forum
Honored Contributor
Does Nios reset vector point to flash?
Please also check if the problem is only with Nios boot. I mean, check if fpga gets correctly configured after you press reset button. Do you use the same flash memory for configuration and Nios program? - Altera_Forum
Honored Contributor
Hello Cris72,
Thanks for your reply. I configure reset vector to cfi_flash offset 0x00 and exception vector to sdram offset 0x20 (working with S29AL032D 16 bit data). I'm using EPCS16 for configuration and Nios program on Flash. My SDRAM and Flash are shared data (16 bit) and address. I can use debug->run as nios hardware to check SDRAM; it's run fine but when i program to flash, the program cannot run. Please help me! - Altera_Forum
Honored Contributor
I believe you have some problem with the bootloader.
I guess you are using the standard bootloader provided by Altera; then you should have a boot_loader_cfi.srec file referenced somewhere in your project. Also check the Advanced.Hal.Linker parameters in BSP. - Altera_Forum
Honored Contributor
Hi Cris72,
I'm using Nios II IDE, and Nios Programmer to program the Flash. When i configure the flash with on-chip memory. The software work fine but when i change it to SDRam (share 16 bit data and address with Flash), it can't worked! Is there any declaration or add something on hardware that i'm missing? or is there problem on shared bus? Please help me!