Anyone knows if the Teensy 3.6 USB is faster?

Status
Not open for further replies.

scytheavatar

New member
Hi. I have a project that requires a microcontroller to transfer data to a PC at a very high bitrate, preferably 64 Mbit/s, and I was hoping to use the Teensy for that. But my understanding is that the Teensy's USB is locked at 12Mbit/s, at least the older versions. Anyone knows if it is still the same for the Teensy 3.6, or if there is any way to increase the cap? Thanks.
 
My understanding is that the k66F on the Teensy 3.6 has two USB cells.
USB0 is low speed/full speed only so is 12Mbit/s is the max for that. This is the one that is connected to the USB socket on the board.
USB1 is low, full and high speed, so you can get 480Mbit/s on that. This is the one that needs a header to be populated and you'd need to find a four pin header to USB socket adapter for that.
 
My understanding is that the k66F on the Teensy 3.6 has two USB cells.
USB0 is low speed/full speed only so is 12Mbit/s is the max for that. This is the one that is connected to the USB socket on the board.
USB1 is low, full and high speed, so you can get 480Mbit/s on that. This is the one that needs a header to be populated and you'd need to find a four pin header to USB socket adapter for that.

And also, the software support for the 2nd USB adapter is in its infancy. So, you likely will need to roll up your sleeves, learn the details about USB, and pitch in to help add the support.

I could imagine using either ethernet or wifi via additional chips might give you faster data to a PC. But that will add a lot of complication.
 
Is there anything (code wise) available for using USB1 on the Teensy 3.6 as a USB device (and not host) with a full on Linux mini-computer such as Raspberry Pi 3. I want to pipe in telemetry data from the 3.6's ADC, among other things, at a high rate and take advantage of the high speed capabilities of USB1.

It looks like I would have to cut the trace between H and USB1-5V and solder a jumper from 5V to the D pad (for device mode). See the bottom right corner right above header connection Pins 1 & 2 of the image of the back of the 3.6 below for the location of said trace/jumper:

teensy36b.jpg

I know that the port portion of the image is pretty small. I have a friend with some (VERY) high end macro camera equipment and lighting (he's a pro-photographer). If he will have the time this weekend, perhaps I can create a higher definition image of the Teensy 3.6's backside, especially the USB1 part.
 
Last edited:
Hi SharpEars, I know this is slightly off topic, but have you tried Sending Serial data to the RPI? I know in the past I and others had issues with RPI with USB throughput, but that was with RPI2's I have not tried 3s yet. But for example with some boards I am playing around with I connect up Uart on RPI expansion header to Serial1 or Serial2 on Teensy and at least with Odroids and Up board, I have been able to run at about 4mbs... May not be fast enough for you, but thought I would throw that out.
 
Hi SharpEars, I know this is slightly off topic, but have you tried Sending Serial data to the RPI? I know in the past I and others had issues with RPI with USB throughput, but that was with RPI2's I have not tried 3s yet. But for example with some boards I am playing around with I connect up Uart on RPI expansion header to Serial1 or Serial2 on Teensy and at least with Odroids and Up board, I have been able to run at about 4mbs... May not be fast enough for you, but thought I would throw that out.

For 4 Mb/s, why not just use block transfers over high speed SPI (i.e., from SPI1)?
 
Last edited:
I might, but my communications are bidirectional, so would then need to add some way for slave to trigger master to say, get the new stuff...
 
I'm receiving at 40*115200 =4608000 Bit/s (the max speed, the <ESp8266 supports) without any problems.
Hardware-Handshake enabled. Serial1.
 
I'm receiving at 40*115200 =4608000 Bit/s (the max speed, the <ESp8266 supports) without any problems.
Hardware-Handshake enabled. Serial1.

That's great Frank - on your FlexiBoard setup? Is there a sample in the github for that?
 
I'm receiving at 40*115200 =4608000 Bit/s (the max speed, the <ESp8266 supports) without any problems.
Hardware-Handshake enabled. Serial1.

Has anyone written up a detailed how-to on connecting the ESP chip with serial flow control?
 
Has anyone written up a detailed how-to on connecting the ESP chip with serial flow control?

With AT-Firmware: easy. (Edit: But be sure, to use the latest - olders are full of bugs. Howto update: See my repro)
Use this code on a Teensy:

Code:
#define WLAN_CTS        20  //GPIO15
#define WLAN_RTS        2   //GPIO13
#define WLAN_BAUD (115200*40)
#define WLAN_FLOWCONTROL 3 //0:disable, 1:enable RTS, 2:enable CTS, 3:both
#define wlan SERIAL1
....
....
  wlan.printf("AT+UART_CUR=%d,8,1,0,%d\r\n", WLAN_BAUD, WLAN_FLOWCONTROL);
  if ( wlan.findUntil((char*)"OK", (char*)"") ) {
    delay(30);
    wlan.begin(WLAN_BAUD);
    if (WLAN_FLOWCONTROL & 1) wlan.attachRts(WLAN_RTS);
    if (WLAN_FLOWCONTROL & 2) wlan.attachCts(WLAN_CTS);
    //NVIC_SET_PRIORITY(IRQ_UART0_STATUS, 16);
  } else {
    Serial.println("Switching Baudrate not successful");
    while (1);
  }


Connect CTS to ESP-Pin GPIO15,
Connect RTS to ESP-Pin GPIO13.

That's all.

The ESP likes bitrates that are a multiple of 115200 (or below 115200)

Hope this helps :)
See my flexiboard-repro on github for a working sketch.
 
Last edited:
Wow, what is the resolution on that display and is it wired directly to the Teensy (and if so, which Teensy?)

i.e., what are you to the left of the display in the video :cool:
ILI9341: 320*(240-16) -16 for the text, but without the text it's the same.
In the video, i used my flexiboard (mounted on the backside of the display).
The display is connected with SPI.

It could be much faster, but it waits for new fft-data before updating..
T3.5 or 3.6 - should work on 3.2, too, but i have currently no setup to test it.
 
ILI9341: 320*(240-16) -16 for the text, but without the text it's the same.
In the video, i used my flexiboard (mounted on the backside of the display).
The display is connected with SPI.

It could be much faster, but it waits for new fft-data before updating..
T3.5 or 3.6 - should work on 3.2, too, but i have currently no setup to test it.

Is the FFT and display code your own, or is it some library?
 
Is there anything (code wise) available for using USB1 on the Teensy 3.6 as a USB device (and not host) with a full on Linux mini-computer such as Raspberry Pi 3. I want to pipe in telemetry data from the 3.6's ADC, among other things, at a high rate and take advantage of the high speed capabilities of USB1.

It looks like I would have to cut the trace between H and USB1-5V and solder a jumper from 5V to the D pad (for device mode). See the bottom right corner right above header connection Pins 1 & 2 of the image of the back of the 3.6 below for the location of said trace/jumper:

View attachment 8691

I know that the port portion of the image is pretty small. I have a friend with some (VERY) high end macro camera equipment and lighting (he's a pro-photographer). If he will have the time this weekend, perhaps I can create a higher definition image of the Teensy 3.6's backside, especially the USB1 part.

I have posted links to very high resolution images of the front and back of the board in the General Discussion forum:

Forum post with links to high-res photos of the Teensy 3.6 (front/back)
 
Hi everyone. I've received my teensy 3.6 last week :). I'm so thrilled, this is exactly the device I've been waiting for.
Thank you so much Paul for having designed this board, it rocks !
I'm very interested to have a look at the usb stack so I can do a high speed game controller using the 2nd USB port of the 3.6.
I've already done that for the Arduino Due, it might help.
Thanks
 
Spi

I might, but my communications are bidirectional, so would then need to add some way for slave to trigger master to say, get the new stuff...

I did just that using a seperate interrupt pin. ESP 8266 spi slave teensy 3.6 master. About to post soon. Msg me if interested.
 
Hi everyone. I've received my teensy 3.6 last week :). I'm so thrilled, this is exactly the device I've been waiting for.
Thank you so much Paul for having designed this board, it rocks !
I'm very interested to have a look at the usb stack so I can do a high speed game controller using the 2nd USB port of the 3.6.
I've already done that for the Arduino Due, it might help.
Thanks

Any updates on this? Did you get USB hi-speed working on the 3.6?
I don't have any Teensy controllers myself yet, only some regular Arduino micros. I would be very interested in low-latency communication between the controller and a PC (OS X or Linux). Anyway, best of luck and please keep us informed if you make progress!
 
I would be very interested in low-latency communication between the controller and a PC (OS X or Linux).

This can be done since many years - All Teensys have native USB which is much much faster than regular Arduinos (some MByte/second).
The question above was regarding a HOST-Mode on the 2nd USB, which is not needed in your case (the PC is USB-HOST, always).

But the question remains: Paul, any progress ? What are you currently working on ?
 
Last edited:
This can be done since many years - All Teensys have native USB which is much much faster than regular Arduinos (some MByte/second).
The question above was regarding a HOST-Mode on the 2nd USB, which is not needed in your case (the PC is USB-HOST, always).

But the question remains: Paul, any progress ? What are you currently working on ?

USB full speed will send/receive packets once per 1 ms frame, while USB high speed could do that once per micro-frame (8 micro-frames in a frame), reducing the latency 8x. I will not be needing HOST-mode. The amount of data i need to send/receive per frame are small, normally < 32 bytes.

On the Arduino micro which has the USB integrated in the ATmega MCU, the USB performance is quite good compared to the other Arduino models who use a separate FTDI part for serial to USB conversion, but i guess a Teensy will easily beat those.
 
Any updates on this? Did you get USB hi-speed working on the 3.6?
I don't have any Teensy controllers myself yet, only some regular Arduino micros. I would be very interested in low-latency communication between the controller and a PC (OS X or Linux). Anyway, best of luck and please keep us informed if you make progress!
No update, I was expecting some help to find where the code dealing with this secondary USB port is, but nobody replied. I've searched by myself but could not find where that part is, if there is anything about this feature somewhere in the Teensy Core.

This can be done since many years - All Teensys have native USB which is much much faster than regular Arduinos (some MByte/second).
The question above was regarding a HOST-Mode on the 2nd USB, which is not needed in your case (the PC is USB-HOST, always).
"regular Arduinos" does not mean anything to me, please consider the fact that the Arduino Due (Sam3X) has a native High Speed USB port (480 Mb/s) and the Arduino Leonardo (ATmega32U4, which is used on the Teensy 2 too) has native Full Speed USB (12 Mb/s).
 
Status
Not open for further replies.
Back
Top