Teensy 3.6 with WINC1500 on SPI1...is this a good data rate?

Status
Not open for further replies.

ariesboy571

Active member
Hi all, I've got my trusty Adafruit WINC1500 breakout connected to SPI1, using WiFi101, and it's perking happily along with the default settings.

After reading a few threads on here, I set the SPI1 bus speed to 24M, then 48M, just to see what might happen. I was surprised to see that, when sending 19,800 bytes of data, the transit time (as reported by the browser) stayed at a constant rate!

The average transit time, over 100 transits, at every SPI bus rate, was 798ms for the entire block of data.

I tried tweaking the buffer sizes in WiFiSocket.cpp; I found that (slightly) lower ones did in fact lower that to 762ms (average over 100 transits).

But is that good? It sort of seems not. But what might make it better?
 
I did some TCP/UDP performance tests a few years back on WINC1500 hooked to T3.2@96mhz.

Code:
WINC1500   (SPI clock 12MHz)
  ping rtt min/avg/max/mdev = 5.282/7.151/16.072/2.897 ms
  TCP send: 3.3 mbs  receive: 3.9 mbs   window 4338
  UDP echo RTT: 2421 us
  UDP send: 3.9 mbs  receive: 3.4 mbs (large recv buffers?)
    SPI clock at 24mhz send: 6.1 mbs

There is a lot of non-SPI overhead as seen by analyzer during a UDP send from WINC1500. With T3.6 and F_BUS 60mhz, the max SPI clock is 30 MHz, but lib couldn't communicate @30mhz for my breadboard setup. Reference manual says WINC1500 SPI max is 48mhz.

winc.png

Other ethernet/wifi performance data: https://github.com/manitou48/DUEZoo/blob/master/wizperf.txt
 
Last edited:
Hi all, I've got my trusty Adafruit WINC1500 breakout connected to SPI1, using WiFi101, and it's perking happily along with the default settings.

After reading a few threads on here, I set the SPI1 bus speed to 24M, then 48M, just to see what might happen. I was surprised to see that, when sending 19,800 bytes of data, the transit time (as reported by the browser) stayed at a constant rate!

The average transit time, over 100 transits, at every SPI bus rate, was 798ms for the entire block of data.

I tried tweaking the buffer sizes in WiFiSocket.cpp; I found that (slightly) lower ones did in fact lower that to 762ms (average over 100 transits).

But is that good? It sort of seems not. But what might make it better?

Would you be able to post a sketch for the Teensy 3.6 that confirms the ATWINC1500 is connected correctly? I have both boards and would like to add WiFi to the Teensy 3.6.
 
I have used the Adafruit WINC1500 breakout board https://www.adafruit.com/product/2999
That link has lots of information on how to wire the breakout board and install the library
https://github.com/arduino-libraries/WiFi101
The library has examples to scan the WiFi networks and various TCP and UDP client and server examples. You'll need to provide your SSID and password in arduino_secrets.h

Be sure to power with 3.3v (5v will fry your Teensy 3.6). The pins I wired were 3v3,grnd,clk,miso,mosi,cs(8) EN-3v3 IRQ-7 RST-4

https://www.arduino.cc/en/Reference/WiFi101
https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout/wiring-and-test
 
Last edited:
Thank you for the help.The Adafruit breakout is what I am using as well.

I wired it as you have noted above, and the firmware sketch runs fine. I am also able to log into my home network and run a ping sketch as well.

Are you using the default Arduino SPI library or the Teensy 3.0 SPI library?
 
Many thanks again.

So a #include <SPI.h> will automatically use the Teensy SPI library and there is no need to specify or add #include <spi4teensy3.h> to the sketch? I'm using the Arduino IDE 1.8.5 and have installed the Teensy Loader 1.41 to that IDE.
 
Many thanks again.

So a #include <SPI.h> will automatically use the Teensy SPI library and there is no need to specify or add #include <spi4teensy3.h> to the sketch? I'm using the Arduino IDE 1.8.5 and have installed the Teensy Loader 1.41 to that IDE.

spi4teensy3.h is a user contributed SPI library for Teensy 3. The default SPI.h library when building for a Teensy is a teensy version different from the original Arduino/AVR SPI library. spi4teensy3.h might provide you some performance improvements.
 
Looks like the spi4teensy3 is now not that different than the default SPI library. It might save an instruction or two in certain places like the send(x) function will not actually pop the (SPI0_POPR) the result, but will instead on the next one clear the receive queue. But my gut tells me, you won't notice any difference as it is already spinning waiting for the transfer to complete before it returns anyway...
 
Status
Not open for further replies.
Back
Top