Teensy 3.0 Serial Lag

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
paulstoffregen
 
Posts: 444
Joined: Sun Oct 11, 2009 11:23 am

Re: Teensy 3.0 Serial Lag

Post by paulstoffregen »

I did some testing on Arduino Uno, where I estimated approx 50% free CPU time during sustained 11.7 kbyte/sec receive. It could probably be more efficient, but since 115200 baud is generally the maximum speed, there doesn't seem to be much need to optimize.

USB virtual serial is far more complex, especially on Teensy 3.0. On AVR and SAM3 (Arduino Due), the hardware implements a FIFO register using the USB packet buffers, so you can just read the next byte out and deal with a few status bits. The hardware automatically takes care of details like the data token toggling. The Freescale USB doesn't have any of that, so the USB code quite complex. On the plus side, dealing with the DMA and interrupt events at such a low level really provides a lot of opportunities too.

Perhaps after Maker Faire I'll write up a blog post about these optimizations and show the benchmark results....

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”