Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 25 of 90

Thread: Anyone knows if the Teensy 3.6 USB is faster?

  1. #1

    Anyone knows if the Teensy 3.6 USB is faster?

    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.

  2. #2
    Member
    Join Date
    Oct 2016
    Location
    Colchester, Essex, UK
    Posts
    55
    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.

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,763
    Quote Originally Posted by mundungus View Post
    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.

  4. #4
    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:

    Click image for larger version. 

Name:	teensy36b.jpg 
Views:	160 
Size:	82.7 KB 
ID:	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.
    Last edited by SharpEars; 11-02-2016 at 03:07 PM.

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,102
    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.

  6. #6
    Quote Originally Posted by KurtE View Post
    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 by SharpEars; 11-02-2016 at 03:36 PM.

  7. #7
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,102
    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...

  8. #8
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    I'm receiving at 40*115200 =4608000 Bit/s (the max speed, the <ESp8266 supports) without any problems.
    Hardware-Handshake enabled. Serial1.

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,931
    Quote Originally Posted by Frank B View Post
    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?

  10. #10
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    You can try the MinimalInternetradio-Example for FlexiBoard - i set it to 20 * 115200, but 40 does work too..
    Might be needed to increase the Serial-Rx buffer to 2048.

    My extended version uses 40x.
    https://www.youtube.com/watch?v=TDX0IgneViA

  11. #11
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,931
    Nice, I'll give that a look.

  12. #12
    Quote Originally Posted by Frank B View Post
    You can try the MinimalInternetradio-Example for FlexiBoard - i set it to 20 * 115200, but 40 does work too..
    Might be needed to increase the Serial-Rx buffer to 2048.

    My extended version uses 40x.
    https://www.youtube.com/watch?v=TDX0IgneViA
    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

  13. #13
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    375
    Quote Originally Posted by Frank B View Post
    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?

  14. #14
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    Quote Originally Posted by Paul View Post
    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 by Frank B; 11-02-2016 at 06:59 PM.

  15. #15
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    Quote Originally Posted by SharpEars View Post
    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
    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.

  16. #16
    Quote Originally Posted by Frank B View Post
    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?

  17. #17
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    Teensy audiolib and ili9341_t3

  18. #18
    Quote Originally Posted by SharpEars View Post
    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:

    Click image for larger version. 

Name:	teensy36b.jpg 
Views:	160 
Size:	82.7 KB 
ID:	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)

  19. #19
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    48
    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

  20. #20

    Spi

    Quote Originally Posted by KurtE View Post
    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.

  21. #21
    Junior Member
    Join Date
    Feb 2017
    Posts
    2
    Quote Originally Posted by Etienne View Post
    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!

  22. #22
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    Quote Originally Posted by notnot View Post
    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 by Frank B; 02-04-2017 at 01:46 PM.

  23. #23
    Junior Member
    Join Date
    Feb 2017
    Posts
    2
    Quote Originally Posted by Frank B View Post
    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.

  24. #24
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    48
    Quote Originally Posted by notnot View Post
    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.

    Quote Originally Posted by Frank B View Post
    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).

  25. #25
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,919
    Isn't the Due discontinued ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •