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

fpga load gives error code -2

Altera_Forum
Honored Contributor II
1,755 Views

Hello, 

 

We have created a custom board with a Cyclone V on it. The boot process works: We can go from preloader to u-boot to linux. 

But now I want to load something in the FPGA, and am trying to do from u-boot. However, I get stuck at error -2: 

SOCFPGA_CYCLONE5# mmc rescan SOCFPGA_CYCLONE5# fatload mmc 0:2 0x2000000 switchbox_master.rbf reading switchbox_master.rbf 7007204 bytes read in 393 ms (17 MiB/s) SOCFPGA_CYCLONE5# fpga load 0 0x2000000 7007204 MSEL = 0 put FPGA in reset phase FPGA is in reset phase FPGA is out of reset phase altera_load: Failed with error code -2 

 

(I added some debug printout) 

According to https://rocketboards.org/foswiki/view/documentation/gsrd131programmingfpga Error code -2 means: The FPGA is not able to enter configuration phase after FPGA reset release request being made at FPGA Manager 

 

Any idea what can be wrong? 

 

 

Thanks, 

Michiel
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
638 Views

The data transfer yet happen which indicate the error not coming from the RBF. 

A quick check on the FPGA config signal tie off against dev kit would be useful
0 Kudos
Altera_Forum
Honored Contributor II
638 Views

We based our hardware design in the EBV SoCrates board. I looked at the nCONFIG pin, but could not see any difference. Is there some other pin? Or maybe a clock? I can't probe the pins at the moment, because I need our hardware guy for that, and he is away on holiday. 

 

I now started the SoCrates board, and with the same rbf file, I get error -4. I think that is a seperate error, maybe related to the RBF format.
0 Kudos
Altera_Forum
Honored Contributor II
638 Views

WE solved it now. It turned out that there was a short between CONF_DONE and nSTATUS. With that fixed, programming the FPGA works. Thanks for the suggestion to look there!

0 Kudos
Reply