nitrof
1
Hi.
I'm working on a web server for a while and I try to optimize speed for user experience.
I recently bough a w5500 shield but I get all request 50ms slower than W5100 chip... I wonder why.
Couldn't find any answer on the web.
Something I found was that SPI clock could be change and the better way to do it is by SPI.beginTransaction function.
I wonder if in the ethernet2 and SD library if those setting are already set to the best(maximum) value?
If not, how the best way to set them.
Then, is there another tips to get speed ?
Regards.
P.S.:using arduino DUE
Nitrof
system
2
I recently bough a w5500 shield but I get all request 50ms slower than W5100 chip... I wonder why.
Well, I wonder how you measured that.
nitrof
3
ho... by the response time on my browser... I don't have any other means...
W5100:
192.168.0.110 200 document Other 9.2 KB 1.91 s
home.htm 200 xhr angular.js:8609 1.3 KB 317 ms
ajax_inputs 200 xhr angular.js:8609 1.2 KB 290 ms
ajax_inputs 200 xhr angular.js:8609 1.2 KB 296 ms
W5500:
192.168.0.110 200 document Other 9.2 KB 2.32 s
home.htm 200 xhr angular.js:8609 1.3 KB 381 ms
ajax_inputs 200 xhr angular.js:8609 1.2 KB 351 ms
ajax_inputs 200 xhr angular.js:8609 1.2 KB 357 ms
nitrof
4
found the answer on w5500.ccp :
SPISettings wiznet_SPI_settings(8000000, MSBFIRST, SPI_MODE0);
so already at max speed. SD is set :
settings = SPISettings(250000, MSBFIRST, SPI_MODE0);
can I put those value higher ? for ethernet for example... arduino DUE SPI should work at 16Mhz ?? And the W5500 should still good...
For the sd.. what is tha max value I can try ?
nitrof
5
OK.. didn't wait an anwser.. I tried it.. 
I set : SPISettings wiznet_SPI_settings(33000000, MSBFIRST, SPI_MODE0);
It make a pretty good improvement:
192.168.0.110 200 document Other 9.2 KB 1.89 s
home.htm 200 xhr angular.js:8609 1.3 KB 311 ms
ajax_inputs 200 xhr angular.js:8609 1.2 KB 285 ms
ajax_inputs 200 xhr angular.js:8609 1.2 KB 289 ms