<?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: USB speed from 32 kB/s to 700 kB/s</title>
		<link>http://forums.leaflabs.com/topic.php?id=1151</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:21:46 +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=1151" rel="self" type="application/rss+xml" />

		<item>
			<title>robodude666 on "USB speed from 32 kB/s to 700 kB/s"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1151#post-7091</link>
			<pubDate>Sat, 05 Nov 2011 11:30:43 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">7091@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hopefully this has proven to be stable. Rastapopolos, it would be really awesome if you could send leaflabs a pull request on github or send them a diff patch so they can roll this into a future release. The boost in performance would be a great addition to the usb changes in the works.&#60;/p&#62;
&#60;p&#62;The &#60;a href=&#34;http://leaflabs.com/docs/libmaple/contributing.html&#34;&#62;docs&#60;/a&#62; discuss how to contribute to libmaple.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "USB speed from 32 kB/s to 700 kB/s"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1151#post-7085</link>
			<pubDate>Fri, 04 Nov 2011 12:17:40 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7085@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Rastapopolos - Thank you for posting. This is a very big improvement, making a bunch of projects feasible. &#60;/p&#62;
&#60;p&#62;Hopefully LeafLabs will fold this into the next release.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rastapopolos on "USB speed from 32 kB/s to 700 kB/s"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1151#post-7084</link>
			<pubDate>Fri, 04 Nov 2011 11:38:49 +0000</pubDate>
			<dc:creator>Rastapopolos</dc:creator>
			<guid isPermaLink="false">7084@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Now, Windows but mostly Linux.&#60;br /&#62;
How do i test the transfer rate ? Simply count the bytes per seconds and see if the&#60;br /&#62;
data in the packets is the data i put in there.&#60;br /&#62;
The transfer rate looks continuous but i haven't look into it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "USB speed from 32 kB/s to 700 kB/s"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1151#post-7083</link>
			<pubDate>Fri, 04 Nov 2011 09:41:49 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7083@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Rastapopolos - thanks, found it.&#60;br /&#62;
Yes, strange.&#60;/p&#62;
&#60;p&#62;AFAIK, VCOM_TX_EPSIZE is only used in the USB descriptor and that code, so it is a bit difficult to see what else it might be interacting with.&#60;/p&#62;
&#60;p&#62;700KBytes/second is very impressive. It is as quick as the best results I've seen for FTDI.&#60;/p&#62;
&#60;p&#62;What OS are you using?&#60;/p&#62;
&#60;p&#62;How are you testing the transfer rate? Is it continuous (i.e. exactly as you posted), or a burst?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rastapopolos on "USB speed from 32 kB/s to 700 kB/s"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1151#post-7082</link>
			<pubDate>Fri, 04 Nov 2011 04:47:14 +0000</pubDate>
			<dc:creator>Rastapopolos</dc:creator>
			<guid isPermaLink="false">7082@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I am using the latest source from git hub. You can find the same code in the IDE in &#34;usb.c&#34;.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "USB speed from 32 kB/s to 700 kB/s"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1151#post-7081</link>
			<pubDate>Fri, 04 Nov 2011 04:38:48 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7081@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Rastapopolos - Which version of the Maple IDE are you using?&#60;/p&#62;
&#60;p&#62;I can't find the file 'usb_cdcacm.c', but I am using Mac.&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rastapopolos on "USB speed from 32 kB/s to 700 kB/s"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1151#post-7080</link>
			<pubDate>Fri, 04 Nov 2011 04:03:24 +0000</pubDate>
			<dc:creator>Rastapopolos</dc:creator>
			<guid isPermaLink="false">7080@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Using SerialUSB to test the usb speed.&#60;/p&#62;
&#60;p&#62;// -- USB speed test --&#60;br /&#62;
unsigned char buffer[64];&#60;br /&#62;
void loop()&#60;br /&#62;
{&#60;br /&#62;
  SerialUSB.write(bufffer, 64);&#60;br /&#62;
}&#60;br /&#62;
//---------------------&#60;/p&#62;
&#60;p&#62;I only got a 32kB/s transfer rate. :-(&#60;/p&#62;
&#60;p&#62;Looked into the code and found this:&#60;/p&#62;
&#60;p&#62;usb_cdcacm.c:&#60;br /&#62;
--------------&#60;/p&#62;
&#60;p&#62;...&#60;br /&#62;
#define VCOM_TX_EPSIZE            0x40&#60;br /&#62;
...&#60;/p&#62;
&#60;p&#62;// We can only put VCOM_TX_EPSIZE bytes in the buffer&#60;br /&#62;
/* FIXME then why are we only copying half as many? */&#60;br /&#62;
if (len &#38;gt; VCOM_TX_EPSIZE / 2) {&#60;br /&#62;
    if (len &#38;gt; VCOM_TX_EPSIZE / 2;&#60;br /&#62;
}&#60;br /&#62;
...&#60;br /&#62;
------------------------------------&#60;/p&#62;
&#60;p&#62;Changed to:  if (len &#38;gt; VCOM_TX_EPSIZE) len = VCOM_TX_EPSIZE;&#60;/p&#62;
&#60;p&#62;And now with the same test i get 700 kB/s. :-)&#60;/p&#62;
&#60;p&#62;Changing the VCOM_TX_EPSIZE to 0x20 also works.&#60;br /&#62;
this results in 600 kB/s.&#60;/p&#62;
&#60;p&#62;Doing two calls of 32 bytes doesn't work, only 32 kb/s.&#60;br /&#62;
SerialUSB.write(bufffer, 32);&#60;br /&#62;
SerialUSB.write(bufffer, 32);&#60;/p&#62;
&#60;p&#62;It seems that only when the buffer is filled completely to the VCOM_TX_EPSIZE in&#60;br /&#62;
one go you get the high transfer speed. &#60;/p&#62;
&#60;p&#62;I am no usb expert but i think when the buffer is completely filled in one go&#60;br /&#62;
it allows to send multiple packets per usb frame.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
