<?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: SerialUSB does not work anymore after some time (2-3 hours?) of USB inactivity</title>
		<link>http://forums.leaflabs.com/topic.php?id=1143</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:07:56 +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=1143" rel="self" type="application/rss+xml" />

		<item>
			<title>samtal on "SerialUSB does not work anymore after some time (2-3 hours?) of USB inactivity"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1143#post-7215</link>
			<pubDate>Tue, 22 Nov 2011 10:47:28 +0000</pubDate>
			<dc:creator>samtal</dc:creator>
			<guid isPermaLink="false">7215@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello all,&#60;br /&#62;
The USB problem you describe with r5, IDE 11 and 12 has been pain for me for months.&#60;br /&#62;
I asked the form about it, but received no cure except some additional complaints.&#60;br /&#62;
Occasionally I find myself struggling with the USB port more than with my actual work.&#60;br /&#62;
My workaround is to keep my finger ready on the reset, and hit it just before expecting the port to fail (sending the DFU or USB not found message)&#38;gt;&#60;br /&#62;
I have tried all the suggested actions in the WinXP device manager ports setup but for no avail.&#60;br /&#62;
Some times it works clean and nice for several days.&#60;br /&#62;
There is obviously a problem with the Maple serial USB that is very annoying.&#60;br /&#62;
samtal
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HDS on "SerialUSB does not work anymore after some time (2-3 hours?) of USB inactivity"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1143#post-7201</link>
			<pubDate>Sun, 20 Nov 2011 12:31:28 +0000</pubDate>
			<dc:creator>HDS</dc:creator>
			<guid isPermaLink="false">7201@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Finally found a workaround for this nasty hangin' of the IDE 0.0.12 serial window, when communicating a lot with the Maple (debug output) via SerialUSB.&#60;/p&#62;
&#60;p&#62;Bug description:&#60;br /&#62;
(System: Maple, Maple IDE 0.0.12, WinXP SP2 )&#60;br /&#62;
A) have a loop sending each 250 to 500 msec some short debug output strings to the SerialUSB. Within that loop is also communication via Serial1(each 100 msec) and Serial2(each 200 msec).&#60;br /&#62;
B) have a request to the SerialUSB each (main.)loop cycle, if there are chars to be read in from the PC.&#60;br /&#62;
C) have the possibility to swich on the SerialUSB debug output or off (by control character from PC).&#60;br /&#62;
D) have the possibility to do the following via PC-control character:&#60;br /&#62;
- SerialUSB.end();&#60;br /&#62;
- delay(5000)&#60;br /&#62;
- SerialUSB.begin()&#60;/p&#62;
&#60;p&#62;Run the program, wait until the debug output on the serial monitor doesn't update anymore (10 - 200 min). In this state:&#60;/p&#62;
&#60;p&#62;1. you are still able to send control chars to the Maple from the IDE serial monitor, which are computed, but nothing from the Maple arrives at the serial window&#60;/p&#62;
&#60;p&#62;2. you will be able to perceive a strongly slowed down cycle frequency of the main loop.&#60;/p&#62;
&#60;p&#62;3. if you close the serial monitor and open it again, it will tell you, that the COM12 cannot be found. If you look under IDE/Tools/Serial Port, your COM port disappeared.&#60;/p&#62;
&#60;p&#62;4. Open the Windows device manager, the COM 12 still ist there! (Why IDE can't find it?)&#60;/p&#62;
&#60;p&#62;Workaround(s) for this state:&#60;/p&#62;
&#60;p&#62;5) Disable the Maple R3 (COM12) in the Windows device manger, wait 5 seconds, re-enable it: The IDE will find the COM port again.&#60;/p&#62;
&#60;p&#62;6) Switch off the Maple debug output by control char from the PC: The cycle frequency of the loop immediately comes back to a &#34;normal&#34; value.&#60;/p&#62;
&#60;p&#62;7) use your function (D) to switch off the maple USB support for 5 seconds. In the windows device manager, the Maple R3 (COM12) disappears, and reappears.&#60;/p&#62;
&#60;p&#62;After 7: you will have back the ability of the IDE to receive SerialUSB fom the maple (for the next half hour or so...) ;-)&#60;/p&#62;
&#60;p&#62;(Hope this helps to find the bug(s))
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HDS on "SerialUSB does not work anymore after some time (2-3 hours?) of USB inactivity"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1143#post-7134</link>
			<pubDate>Thu, 10 Nov 2011 13:39:46 +0000</pubDate>
			<dc:creator>HDS</dc:creator>
			<guid isPermaLink="false">7134@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Unfortunately, the behaviour stays the same, newly started PC, no screensavers, all energy saving options switched off, the failure of access to the USB virtual com port may occur earlier or later.&#60;br /&#62;
It's very hard to say, which might be the cause, something in Windows, something with the virtual COM-port driver, or something with the Maple USB handling.&#60;br /&#62;
Sometimes, I have to plug out the Maple USB connector at the PC, go to Windows/System/Device Manager (showing that something with COM 12 is running bad) after re-plugging the USB connector to the PC into different COM-port, re-install the driver, getting a new com port from windows (now COM 13 instead of COM12 before) REboot Maple in permanent bootloader mode,  restart MapleIDE, connecting via MapleIDE /MainMenu/Tools/SetComport...&#60;br /&#62;
then I can flash again and communicate with the board.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "SerialUSB does not work anymore after some time (2-3 hours?) of USB inactivity"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1143#post-7070</link>
			<pubDate>Wed, 02 Nov 2011 14:36:18 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">7070@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks for the report. From your description, it sounds like there may be a bug in the way the USB stack is coming out of the suspended state.&#60;/p&#62;
&#60;p&#62;If you put the computer to sleep and then wake it up, does the failure then occur, regardless of how much time has passed?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HDS on "SerialUSB does not work anymore after some time (2-3 hours?) of USB inactivity"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1143#post-7064</link>
			<pubDate>Tue, 01 Nov 2011 14:31:45 +0000</pubDate>
			<dc:creator>HDS</dc:creator>
			<guid isPermaLink="false">7064@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Did do some more tests on this:&#60;br /&#62;
As long as the Windows XPSP2 does not enter some power saving mode (Switch off screens, switch off some harddisks), the described SerialUSB failure does not occur.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HDS on "SerialUSB does not work anymore after some time (2-3 hours?) of USB inactivity"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1143#post-7052</link>
			<pubDate>Sun, 30 Oct 2011 15:53:48 +0000</pubDate>
			<dc:creator>HDS</dc:creator>
			<guid isPermaLink="false">7052@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, all,&#60;/p&#62;
&#60;p&#62;tried search this-&#38;gt;location and google, but didn't find any answers.&#60;br /&#62;
Have a Maple rev5 here, connected to:&#60;br /&#62;
ATmega328 - Serial1, (works good)&#60;br /&#62;
Sparkfun serial LCD v2.5 pin26 - bitbanging (works good)&#60;br /&#62;
PC via SerialUSB, PC: Windows XP SP2.&#60;/p&#62;
&#60;p&#62;No problems 300+ times flashing the chip so far in developement phase ;-).&#60;/p&#62;
&#60;p&#62;The maple by the time now does nothing else than:&#60;br /&#62;
Setup: initialize the devices (see above) and set some variables&#60;br /&#62;
Loop:&#60;br /&#62;
See wether a char is in serialUSB entrance,&#60;br /&#62;
if '1': poll new data from the ATmega328, send them to PC (char[40], not more)&#60;br /&#62;
if '3': put out a char[20] constant to SerialUSB&#60;br /&#62;
if 'h': put out some char[20] to the LCD&#60;br /&#62;
if millis &#38;gt; 2000 than last time measurement, toggle LedPin, move LCD cursor one to the right.&#60;/p&#62;
&#60;p&#62;(Latter to see if loop is still alive.)&#60;/p&#62;
&#60;p&#62;This all works perfectly as long as I stay somehow busy and communicate from time to time with the board, putting the above keys into the serial monitor, but if I have to leave for a longer telephone call, coming back to the PC, it refuses to anything of the above entries.&#60;br /&#62;
The loop is still alive (blinkin LED, moving LCD cursor each second one further), but the SerialUSB seems to be switched off.&#60;br /&#62;
None of the PC chars reaches the SerialUSB input.&#60;/p&#62;
&#60;p&#62;Using Maple IDE Version 0.0.12&#60;/p&#62;
&#60;p&#62;Any comments on that? Or where I could find explanations / workaround?&#60;br /&#62;
Should I wake up SerialUSB from the CortexM3 side regularly after certain period?&#60;br /&#62;
Should I keep sending each 30 min an 'still am here' char to the PC in oder the PC is not killing the connection by timout? Does the PC driver has a timeout?&#60;/p&#62;
&#60;p&#62;Btw.. just noticed that the IDE behaves strange in this 'hungup' state:&#60;br /&#62;
loading and closing a new sketch then leaves the IDE splash screen on the desktop.&#60;br /&#62;
Had to restart the IDE (close all open sketches, restart) to get rid of the IDE splash screen.&#60;br /&#62;
Closing and reopening the serial window of the active sketch alone didn't cure.&#60;/p&#62;
&#60;p&#62;regards, happy for any answer on this topic...
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
