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

Cyclone V remote update failed by nStatus negative pulse.

Altera_Forum
Honored Contributor II
1,319 Views

[h=2]Cyclone V remote update failed by nStatus negative pulse.[/h]Hello, 

 

I am using cyclone V with S25FL064 flash.  

I generate a sof with rsu for both factory image and user image, and coverted all of them into .flash. The address of two apps is just after the sof. 

Address arrangement(memory map): 

Factory: 

0x000000 sof 

0x17xxxx factory image 

User: 

0x200000 sof 

0x37xxxx User image 

All of the .flash are burned into S25FL064 with nios2-flash-programmer. 

After resetting, the factory image boots well and starts to reconfig to user image, but it fails to reconfig to the user image and reboots again. 

From the scope, I capture a negative pulse on nStatus, at the same time conf_done also goes low (keep low around 600ms, then goes high. I think it because the reboot succeeds), nothing changes on nConfig. 

After reboot, the rsu status is read as 0x04 which indicates nStatus fail. 

Could anyone help? I do very appreciate for any proposal. 

 

Best Regards 

hdai 

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
557 Views

Is there any moderator cleaning up excessive cross postings?

0 Kudos
Altera_Forum
Honored Contributor II
557 Views

 

--- Quote Start ---  

Is there any moderator cleaning up excessive cross postings? 

--- Quote End ---  

 

 

I don’t think it is the problem. The problem is that it is hard to make this function work! And nobody collects all the related questions into one post for reference. Remember everyone could be a newbie in a brandnew 

area so a good reference is pretty necessary. 

 

hdai
0 Kudos
Altera_Forum
Honored Contributor II
557 Views

Solved! 

I hope the following post would help the one who is still confused by this issue. 

 

1. Please confirm which epcs controller is used in the project. 

a. if use EPCS/EPCQ Leagcy, an additional bootloader is needed (refer to "epcs bootloader" in alterawiki). Two Qsys projects are needed with different bootloader for factory and user images. 

Download the asm bootloader, change two definitions (EPCS_FLASH_CONTROLLER_0_BASE, SOFTWARE_OFFSET) according to the design, compile it. 

Then .hex will be generated. Go to Qsys, create a 1k onchip rom, assign the .hex to this rom in the onchip rom setting. 

Build Qsys project, then build Quartus project, after that .sof is ready. 

In my system: 

Factory sof at 0x000000 (reconfigure address) 

Factory App at 0x1c0000 (SOFTWARE_OFFSET) 

User sof at 0x200000 (reconfigure address) 

User App at 0x3c0000 (SOFTWARE_OFFSET) 

b. If altera serial controller is used. I think different reset address shall be set in cpu' vector setting. Not bootloader is needed anymore. 

2. generate .flash for all .sofs, and .elfs. 

change address for .flash by using nios2-elf-objcopy. 

i.e. nios2-elf-objcopy -I srec -O srec --change-addresses=0x00200000 "./usersof_tmp.flash" "./usersof.flash" 

3. For legacy controller nios2-flash-programmer works for .flash.  

For altera serial flash, nios2-flash-programmer does not work. The .jic is used to burn the flash. 

 

hdai
0 Kudos
Reply