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

NicheStack: ARP refuses to work

Altera_Forum
Honored Contributor II
1,792 Views

Hello, 

I am trying to start the NicheStack on Nios II. I've fallowed the stack manual and prepared example code available here (http://pastebin.com/bfqwah7c). 

The stack starts fine, however ARP doesn't work. When I try to ping the IP I set, the stack doesn't respond to ARP broadcast message. However if I run the example code (either Simple Socket Server or Web Server), then the computer gets ARP response, I reupload my code and the stack responds to ping. Basically it is like this: 

upload web server example -> start ping -> upload my code -> ping drops a few timeouts during Nios II upload process and the continues to work. 

 

Now what is more strange: if I change the IP address, computer gets the new address and ping successfully continues to work. 

 

What did I miss there?
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
1,096 Views

It seems like if your code is missing some initialization which is instead performed by SSS or WebServer programs. 

It could be PHY initialization; I think this is the only one which is possibly not reset and reinitialized when you reload the code. 

Check if your code programs the MAC address correctly.
0 Kudos
Altera_Forum
Honored Contributor II
1,096 Views

Hm, strange, according to ethernet and the nichestack tcp/ip 

stack - nios ii edition manual (http://www.altera.com/literature/hb/nios2/n2sw_nii52013.pdf) pages 11-4 and 11-5 I need to run alt_iniche_init() and netmain(), then wait for iniche_net_ready. This should initialize the stack. I use the same steps in my code. What is really strange - ping does work, so the stack works and ICMP works... I suppose ARP partialy also works, because if I change the IP in the stack, it is found by ping easily on the next software upload (ip is changed, arp should tell the new ip address). 

 

Anyway, thanks for pointers, I am checking.
0 Kudos
Altera_Forum
Honored Contributor II
1,096 Views

Solved: needed to add tse_my_system.c to the project to let the system load RGMII interface properly.

0 Kudos
Altera_Forum
Honored Contributor II
1,096 Views

Hello Socrates, 

 

I am also kind of similar situation, so please provide me the file tse_my_system.c so that i can test my system too,  

 

My problem is ... 

 

1. Simple_Socket_Server (Edited)---->Start Ping---->Receive Data From Remote ESDK Board serially----->Generate Interrupt---->Stop Pinging.& Code Stuck 

2. Reload The HW/Sw---->Start Ping---->Receive Serial data generate Interrupt---->Stop Pinging & Code Stuck. 

 

so just for try, please provide tse_my_system.c 

 

i have also also Post my Problem on forum post May 10th, 2013, Post No. 16 "http://www.alteraforum.com/forum/showthread.php?t=39445&page=2"
0 Kudos
Thomas1968
Beginner
1,063 Views

Hi there,

were are using an older of Niche Stack for NiosII (v3.4) and I'm looking for related documentation.
Happy to hear from you

Best Thomas

0 Kudos
Reply