Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Teensy 4.0 - easiest high-speed output

  1. #1

    Teensy 4.0 - easiest high-speed output

    Hi,

    I'm waiting for delivery of my first Teensy 4.0 as an eval. With prior models I've used USB Serial as my output stream to a host PC and accepted the ~10Mbps virtual COM port stream into a Python-based datalogging system. With the 4.0, I'd like to know what the best AND easiest way is to speed up data output.

    Let's assume for now that I'm outputting ASCII streams from the Teensy using printf. From the big beta thread it sounds like USB Serial will "just work" at faster speeds than before. Is that true? If that's not, what's a good way to take advantage of USB 2.0 HS that's still relatively easy to implement both on the Teensy and in a host PC? I don't have a fixed requirement for data rate, but am hoping for several times faster performance than the Teensy 3.6. 80 Mbps would be great.

    Thanks!

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,530
    What I read in different threads is that the USB serial of the Teensy is so quick that it can flood the Arduino Serial Monitor in a way that everything stalls... So, I‘d less worry about the Teensy‘s speed than about the PC side. 80Mbps aren‘t a real problem.

  3. #3
    Quote Originally Posted by Theremingenieur View Post
    What I read in different threads is that the USB serial of the Teensy is so quick that it can flood the Arduino Serial Monitor in a way that everything stalls... So, I‘d less worry about the Teensy‘s speed than about the PC side. 80Mbps aren‘t a real problem.
    Ok, that would be ideal. I don't use the Arduino Serial Monitor except for occasional debugging, and I know the PC-side software can handle it. I collect data in one thread, process it in another, and run my GUI in a third, and right now it barely registers any CPU usage maxing out the 12mbps USB port. I'm hoping I can use the same virtual COM port method and not have to write a custom driver on the PC or do any special packetizing of data on the Teensy side.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,699
    As noted the T_4 USB just pushes data out faster with no change in user sketch. What was about 25K 'lines per second' possible from a benchmark on T_3.6 comes out of T_4 at 150K to 300K lines per second with the current T_4 USB code.

    So that looks like a minimum 6X speed up to Windows and for some reason Paul reported the 300K from Linux so the difference is the PC side handling of the incoming data. So YMMV - I modified a PC Program.exe to just read and do minor data verify and dump it to bitbucket and the Teensy was held back by the USB protocol on the PC side receiving the data.

    Paul indicates there is hope to improve T_4 output rate from USB - but where it is now overwhelms the PC and IIRC didn't do much as far as loading the Teensy 4. Those tests were some weeks back after the last update [ in beta thread lps.exe or 'lines per second' benchmark ].

    So bottom line - The T4 should just present data about as fast as it can be consumed at 4.8 MBytes/sec or faster.

    For ref perhaps see :: github.com/PaulStoffregen/USB-Serial-Print-Speed-Test

    or github.com/Defragster/T4_demo/ … /pjrc_latency_test

  5. #5
    Thanks, defragster!

  6. #6
    Senior Member
    Join Date
    Apr 2019
    Posts
    141
    What types of data are you transmitting ? Is this a datalogger ? You might be able to reduce data by using numbers that represent descriptions

  7. #7
    Essentially dumping binary data from an external device under test (a memory, ADC, etc) for post processing on a PC. I do a little bit of analysis in real time to check for errors but I need the full dataset recorded and don't have spare cycles for conpression.

Posting Permissions

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