What happens if I set the USB Virtual Com Port to a higher speed? Teensy can transmit faster than com port speeds on the virtual usb com port.
What happens if I set the USB Virtual Com Port to a higher speed? Teensy can....
(12 posts) (5 voices)-
Posted 5 years ago #
-
Hi josheeg!
We've gotten the virtual com port up to 115200 baud; if you need more speed than that over USB you probably want to be using a different profile/device type, such as isochronous data transfer, microphone, HID, or mass storage device. We're working on code for other profiles a la LUFA (http://www.fourwalledcubicle.com/LUFA.php ), feel free to take a whack at it!
As to simply hacking the virtual com port code to go faster, we haven't tried and would love to hear about it if you can pull it off!
Posted 5 years ago # -
Well the teensy website sais the usb com port has a 64 byte buffer if your putting one byte in and sending that will slow it down because it works in batches.
http://www.pjrc.com/teensy/usb_serial.html
It was allready done on this site you can check out the c code and try it on the real hardware itworks. On the Teensy ++ that is... so why not with a monster bigger processor like the arm.???
here is the benchmark on the teensy++
Operating system Teensy Teensy++
Ubuntu 9.04 (Linux 2.6.28), 32 bit 961 kbytes/sec 1157 kbytes/sec
Mac OS X 10.5.7 639 kbytes/sec 901 kbytes/sec
Windows XP SP3 820 kbytes/sec 1022 kbytes/sec
Windows Vista SP1, 32 bit 820 kbytes/sec 1023 kbytes/sec
Windows 7 Beta (build 7100), 32 bit 823 kbytes/sec 1027 kbytes/sec
Maximum Theoretical Bandwidth
USB 2.0 Specification
Section 5.8.4, Table 5-9, Page 54 1056 kbytes/sec 1216 kbytes/secPosted 5 years ago # -
Well have to give this a try with Maple. The USB hardware on the stm32 is limited to 64 byte data payloads, plus full speed usb only runs with a 36MHz clock, its possible to saturate the usb pipe long before you saturate the arm.
However, compared to an AVR setup, Id still expect a decent boost for a few reasons. The USB peripheral has a dual port packet memory, meaning you can r/w from it while the usb peripheral is doing the same. So even if you data rate is stuck at 1M or something, you can still fill and clear the buffer at the full 72MHz ARM rate.
Standard USB VCOM drivers often throttle the connection to match the baud rate, slowing the connection down. However, we certainly dont do any throttling on Maple's end, so you should be able to turn it up until you saturate the usb full speed pipe using the modified drivers you linked to. Ill let you know how it pans out.
Posted 5 years ago # -
I only run linux and that seems to be the highest speed USB Com Port. It does not need drivers but permitions proably need to be set but I am new to this.
The com port receiving program does need to be fast enough to catch the vcom port info.
So if it is a GNU GCC C standard program then it should read from the maple the same as it would read from the teensy.This could also improve speed of uploading etc.
Posted 5 years ago # -
We upload over DFU, not serial. But well release benchmarking info on the serial port as we continue to hack on it. Keep us posted with any results you generate.
Posted 5 years ago # -
I am refering to upload and microprossesor output can be usb speeds not com port speeds by using the virtual comport and 64 byte buffers and transfering in packets. Check out how the teensy++ does it. This would allow the "DFU" or whatever uploader you have to work faster and samples taken by the micro to be sent to the computer faster so theirwould be less chance of buffer overflow.
Posted 5 years ago # -
So the differences from the virtual com port serial interface that uses USB speeds on the teensy++ and uses the arduino like code to print at high speed com port data to and from the pc wouldn't it make sence to try to compile it for the maple and see where the compiler hangs?
I do not have one yet higher than com port speeds USB virtual com port speeds are nessisary for my project.Posted 5 years ago # -
Hi,
Is there any progress regarding this? Did anybody manage to use the usbSerial at high speed (around 1Mb/s)?
Nothing has been updated in the documentation.Thank you in advance,
Thomas
Posted 4 years ago # -
Really nothing?…
I'd be ideally interested in the HID profile mentionned at the beginning of the thread. But high speed virtual com port would already be a great improvement.
Thanks for updating the post!Posted 4 years ago # -
to my knowledge no one has reported any hacks to get the USB com speed into the 1Mb range. The USB peripheral itself maxes out at 1.44Mb/s and that has to include all the overhead related to USB (tokens and setup packets etc.). Even more slow downs are incurred by the USB stack itself. I hypothesized that that most (or all) of the throttling was going on the host side of things, Maple completely ignores the COM speed (although it notes it in a struct somewhere). We would gladly accept some more thorough experimental results playing with the USB peripheral.
Posted 4 years ago # -
poslathian -
The USB peripheral itself maxes out at 1.44Mb/s
How did you derive that number?
I started doing some estimating today about calculating that maximum, so I am very interested in how you got that (I was starting with number of end points, max packet size, maximum number of packets/second)
Posted 4 years ago #
Reply
You must log in to post.