<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Speed of the USB serial?</title>
		<link>http://forums.leaflabs.com/topic.php?id=606</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:09:29 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=606" rel="self" type="application/rss+xml" />

		<item>
			<title>StephenFromNYC on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3913</link>
			<pubDate>Wed, 16 Mar 2011 11:08:45 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">3913@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello gbulmer-&#60;/p&#62;
&#60;p&#62;Were you able to use the &#60;code&#62;usbGetDTR()&#60;/code&#62; to develop your &#60;code&#62;SerialUSB&#60;/code&#62; code?&#60;/p&#62;
&#60;p&#62;Did your speed tests approach the numbers described on the PJRC web page?  I believe the USB bandwidth benchmarks described on the PJRC web page are for isochronous USB transfers.&#60;/p&#62;
&#60;p&#62;I have begun to think more about using the DTR (Data Terminal Ready) and RTS (Request to Sent) lines with &#60;code&#62;SerialUSB()&#60;/code&#62;, but at the moment I do not have anything intelligent to contribute.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3381</link>
			<pubDate>Tue, 18 Jan 2011 18:29:06 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3381@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;poslathian - thanks for the DTR suggestion. That is potentially nicer than my hack. It looks like I won't have time to do much until the end of the week :-(&#60;/p&#62;
&#60;p&#62;I was expecting over a megabit/second, and believe under good conditions, over 0.5 megabytes/second is feasible.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3377</link>
			<pubDate>Mon, 17 Jan 2011 18:26:42 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">3377@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;gbulmer you should be able to get dtr with:&#60;/p&#62;
&#60;p&#62;#include &#34;usb.h&#34;&#60;/p&#62;
&#60;p&#62;usbGetDTR()&#60;/p&#62;
&#60;p&#62;im curious to see how much the modified teensyduino serial driver helps - since it removes the host side throttling. you might want to check out the debug-serialusb branch:&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/libmaple/tree/debug-serialusb&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/tree/debug-serialusb&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;of libmaple, which currently strips out the ring buffer on rx which was buggy and caused all sorts of issues when you tried to send &#38;gt;=64 bytes at a time.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3375</link>
			<pubDate>Sun, 16 Jan 2011 22:37:34 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3375@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, I'll be looking forward to your benchmarks. I was thinking of upgrading my LED display from 800 channels to 960 channels (both using 1:64 multiplexing) but only if I can achieve more than 115,200 bits per second, which I can't test at the moment.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3371</link>
			<pubDate>Sat, 15 Jan 2011 20:48:07 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3371@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'd been developing a simple benchmark based on pjrc's benchmark over Christmas.&#60;/p&#62;
&#60;p&#62;I did have some numbers for an initial version, but I wasn't very happy with my code.&#60;br /&#62;
The technique pjrc uses to synch host and microcontroller, via DTR, isn't visible AFAIK on Maple. I did a simple handshake, but I was hoping DTR would get surfaced in the Maple USB rework, so the code would be very similar. Having said that, I think I should get less than 1% error, which is likely adequate.&#60;/p&#62;
&#60;p&#62;I'll try to run in in the next couple of days.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3370</link>
			<pubDate>Sat, 15 Jan 2011 19:06:04 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3370@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I will experiment soon, but according to this:&#60;br /&#62;
&#60;a href=&#34;http://www.pjrc.com/teensy/usb_serial.html&#34; rel=&#34;nofollow&#34;&#62;http://www.pjrc.com/teensy/usb_serial.html&#60;/a&#62;&#60;br /&#62;
It may be possible to get in the hundreds of kilobytes range!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3369</link>
			<pubDate>Sat, 15 Jan 2011 10:59:30 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">3369@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ostensibly any generic virtual COM (cdc ACM) driver should work. In fact on linux and mac we just use the generic drivers, and on windows we use the built in usbser.sys driver. The serial driver provided by us for windows is really just a .inf pointer to the built in windows usbser.sys    Keep us posted on your progress on this. &#60;/p&#62;
&#60;p&#62;There is a separate driver for flashing Maple (currently) which provides the DFU interface (device firmware upgrade). Again on linux and mac this is built in, on windows this is provided by libusb, which is the driver labelled &#34;maple_dfu&#34; in our installation bundle. I believe libusb does provide a 64 bit version.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3367</link>
			<pubDate>Fri, 14 Jan 2011 08:24:31 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3367@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Will any USB Virtual Serial driver work with the Maple? I'm using 64-bit Windows 7 and the provided driver is 32-bit only. I'm using a 32-bit PC to flash the Maple, but I would like to use my 64-bit computer to stream the data to the Maple.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3343</link>
			<pubDate>Wed, 12 Jan 2011 15:22:05 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">3343@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Were working on improving the serialusb in 0.0.10, but im afraid it will be even slower than before, since a lot of the fixes in usb.c/h are related to removing the rx ring buffer (that was broken). The key to the serialusb is to send and receive 64 bytes at a time since each usb packet has a max length of 64 bytes, and you incur the full cost of the usb bus and operating system overhead regardless of whether you send 1 byte or 64. In general you wont get huge speeds out of it, the some operating systems will throttle the bus based on the baud settings, so 115200kbs baud will give you that and no more.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>soundcyst on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3335</link>
			<pubDate>Mon, 10 Jan 2011 14:19:13 +0000</pubDate>
			<dc:creator>soundcyst</dc:creator>
			<guid isPermaLink="false">3335@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;i believe the maple is using the CDC class, which uses USB bulk transfers, meaning latency and bandwidth are not guaranteed..  if you're trying to do something in real time, you'll probably want to use isochronous mode, which has a guaranteed minimum latency, but does not do error checking (it's mostly used for audio and video).&#60;/p&#62;
&#60;p&#62;setting up the maple in isochronous mode is a bit of a challenge though, as you'll have to hack a the bootloader..&#60;/p&#62;
&#60;p&#62;using jtag, or an ftdi adapter with the native bootloader are options too.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Speed of the USB serial?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=606#post-3334</link>
			<pubDate>Sun, 09 Jan 2011 19:47:20 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3334@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;What would be roughly the maximum speed of the USB serial code for the Maple? I am trying to stream 256kbps of data to the Maple in real time.&#60;/p&#62;
&#60;p&#62;The documentation says USBSerial is slow and inefficient, yet looking at the implementation (&#60;a&#62;https://github.com/leaflabs/maple-ide/blob/master/hardware/leaflabs/cores/maple/usb_serial.cpp&#60;/a&#62;) it seems to be nothing more than a wrapper around USB.h. For example:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;uint32 USBSerial::read(void *buf, uint32 len) {&#60;br /&#62;
    if (!buf) {&#60;br /&#62;
        return 0;&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;    return usbReceiveBytes((uint8*)buf, len);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;uint8 USBSerial::read(void) {&#60;br /&#62;
    uint8 ch;&#60;br /&#62;
    usbReceiveBytes(&#38;amp;ch, 1);&#60;br /&#62;
    return ch;&#60;br /&#62;
}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I see nowhere where it is hard coded to be in the kilobit range, so unless I'm missing something, the USBSerial class would be capable of receiving mbps of data?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
