Go Down

Topic: DUE ethernet performance on W5200 with SPI and SPI+DMA (Read 25 times) previous topic - next topic


Most of the older Ethernet shields have the wiznet w5100  chip.  I have a wiznet WIZ820io with the newer w5200 chip. The w5200 has 32KB of buffers (vs 16KB on w5100), and will run at up to 33.3mbs (megabits/second) over SPI (0.3mbs on w5100).  I added the support mods for the W5200 to w5100.cpp and w5100.h in  hardware/arduino/sam/libraries/Ethernet/utility/.  There is also a minor/optional modification to Ethernet.h. Those updated files and early performance results (wizperf.txt) can be found at

Simple UDP tests included 8-byte echo latency (microseconds), UDP 1000-byte packet sends from DUE, and lossless receive rate for 1000-byte UDP packets.  The wiznet chip devotes 2048 bytes to each send and receive buffer (per socket).  UDP is a lossy protocol.  TCP will typically be slower, but it is reliable and adapts to available bandwidth.

Results include tests on the UNO and maple.  On the maple and DUE, one can test SPI+DMA. The wiznet site only guarantees 33.3mbs SPI performance for the W5200.  I got reliable results at SPI speeds of 28MHz, but errors at 42MHz.  The DMA network tests for the DUE are still in progress and will be posted later on this thread at the git URL above.


I was did a project about using DUE and W5100 shield as a HTML server in a LAN recently, but it was instable, on average every work two days die once, i don't know what reasons caused this problem. In before i was using UNO and it work well, i guess maybe the DUE is still in state of beta?


I've added the SPI+DMA w5200 Ethernet results to git link below.  With DMA and SPI clock at 28 MHz, one gets nearly 16 million bits/second, about 3 times the SPI-only performance.  The file w5100.cpp.dma1 is the modified version of w5100.cpp that supports w5200 and DMA+SPI.  Results are in wizperf.txt at


DMA code is modified from fat16lib's SD work.



I finally got a couple WIZ820io with the W5200 chip.  I'm trying to replicate your results on the Due but I'm running into difficulties.

I have it hooked up per the picture I made, hopefully this helps someone else or if I have it hooked up wrong please let me know:

My main problem is that using your modified Ethernet.h and updated w5100.cpp and w5100.h files I'm having a problem with the device locking up if I press the F5 button on my Firefox browser too many times.  It seems that if I press the F5 key about once every half a second the Due will crash/lock up and afterwards will not respond to ping or http.  Only a reset of the Due through pressing reset button or re-uploading the sketch will allow it to be pinged once again:

Let me know if you have any ideas, I would love to get this thing running reliably.  I would hate to be impatient hundreds of miles from home and crash my due/W5200 remotely just because I was hitting refresh on my smartphone too often. Haha!

I'm running the WebServer sketch under:

I have been able to verify that the R3 version of the Arduino Ethernet shield running the W5100 chip does not suffer from this problem.  In fact I can hold down the F5 key and it will not drop ping and will continue to respond to http.


Go Up