Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
908 Views

LwIP problem. Physical + Software?

Hi, we are currently developing a product with that is supposed to gather data from many sensors and then send that data over Ethernet. We are using a some VHDL custom hardware to implement the interfaces with the AD conversors and an embedded processor with the lwIP stack to send the data over ethernet. At the moment we are using the Axi EthernetLite peripheral. 

 

 

Since the first prototypes came in we have been having problems with the data transmission. It turns out we made a pretty big hardware error and forgot to place isolators on our ethernet interface (the jack that we used turn out not to have them inside) so we had to work around this by attaching another connector to the board and connecting it with flying wires. We kept them as short as possible, used Ethernet wires and twisted them correctly. It turns out the twisted pairs are also wrongly routed withing the PCB board. We are talking about 4cm tracks so I don't really know how relevant his is. 

 

 

Even though the link seems to "work", that is, we can send data back and forth, we have been having many problems when it comes to sending big chunks of data. At the beggining the board use to hang up right away (microblaze would get stalled anywhere and reset to 0x0000004) but after improving the firmware a lot and tunning some stuff in the LwIP options it seems it doesn't do that anymore. What happens now is that when you send relatively small packets (hundreds of KB) it all goes fast and well, however when you increase the size of the data too much some errors start happening and the throughput drastically falls to the point where it can take minutes to do the same that it should be done in seconds. 

 

 

I have ran very similar codes on evaluation boards and have seen no such behaviour.... I don't know it this problem is purely physical (since all the modifications and routing errors we made) or is there is some firmware explanation to. I suspect it might be a little of both, maybe some buffer is getting full because there are too many errors on the like you know.... Anyway I caputured a transmission that showed this behaviour with Wireshark and I am attaching it. As you can see once the errors start appering there is no stopping them. The error pattern does not seem to be random so I am hoping that somebody can find a reasonable explanation for them, I just don't know enough about TCP.... 

 

 

 

 

Another interesting fact is that all this errors seem to disapear if I turn on the LwIP debugging or if I include calls to "xil_printf" inside my code (to know how things are going) so the errors seem to be speed related in some way.... This is very frustrating as I can't debug the issue!! 

 

 

 

 

Help please!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
38 Views

It looks like you forgot to attach the Wireshark capture

Altera_Forum
Honored Contributor I
38 Views

You also should try reposing this on a Xilinx forum. Microblaze won't run on Altera devices... :-)

Reply