<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/3126" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2009-10-07T10:43:51+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/3126</id>

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-10-07T10:43:51+02:00</updated>

		<published>2009-10-07T10:43:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11265#p11265</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11265#p11265"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11265#p11265"><![CDATA[
I have read about this when doing support. Somebody found out that the program was executing normally, but the I/O registers were reset to their RESET state. I have not verified this myself, so it may have been some other unexpected behavior.<br /><br />On the other hand, I have seen lots of EMI problems with the AVR myself, especially with V-USB. Probably because a long cable is directly connected to I/O pins.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Wed Oct 07, 2009 10:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alan Chatham]]></name></author>
		<updated>2009-10-07T02:25:11+02:00</updated>

		<published>2009-10-07T02:25:11+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11256#p11256</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11256#p11256"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11256#p11256"><![CDATA[
<blockquote><div><cite>christian wrote:</cite>... Analysis has shown that the AVR itself performs kind of half of a reset. Some parts of the chip go into reset status, others don't. I have seen this even on projects without USB connectivity.<br /></div></blockquote><br /><br />Sorry this is drifting slightly off-topic, but I was wondering if there were any resources to look into about this sort of &quot;half-reset&quot; problem?  Thanks so much!<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2888">Alan Chatham</a> — Wed Oct 07, 2009 2:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-10-04T11:39:44+02:00</updated>

		<published>2009-10-04T11:39:44+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11191#p11191</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11191#p11191"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11191#p11191"><![CDATA[
If your main() routine begins with a usbDisconnect() which lasts for some time (all our examples do that), then I don't see a difference to initiating the disconnect somewhere during runtime.<br /><br />If your main() does not do that, the host won't know that you had a reset. The USB driver's usbDeviceAddr variable is reset to 0, but the host tries to reach it under the address which was negotiated before the reset.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Sun Oct 04, 2009 11:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2009-10-03T19:42:22+02:00</updated>

		<published>2009-10-03T19:42:22+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11189#p11189</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11189#p11189"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11189#p11189"><![CDATA[
<blockquote><div><cite>christian wrote:</cite>Why should this prevent the disconnect/connect sound? A watchdog reset also triggers a disconnect. If it does not, there's a discrepancy in the host's notion of the USB ID and the device's notion.<br /><br />You should be able to prevent EMI problems with a (very) good board layout.</div></blockquote><br /><br /><br />Dear Christian, I am not expert on USB however the solution I adviced somehow worked for me. Could you explain little more what may cause  &quot;discrepancy in the host's notion of the USB ID and the device's notion.&quot; Actually after reset of device I can still read my usb parameters corretly and windows does not give plug - unplug sound.<p>Statistics: Posted by Guest — Sat Oct 03, 2009 7:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-09-28T12:00:35+02:00</updated>

		<published>2009-09-28T12:00:35+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11126#p11126</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11126#p11126"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11126#p11126"><![CDATA[
Why should this prevent the disconnect/connect sound? A watchdog reset also triggers a disconnect. If it does not, there's a discrepancy in the host's notion of the USB ID and the device's notion.<br /><br />You should be able to prevent EMI problems with a (very) good board layout.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Sep 28, 2009 12:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2009-09-27T22:38:34+02:00</updated>

		<published>2009-09-27T22:38:34+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11122#p11122</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11122#p11122"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11122#p11122"><![CDATA[
I tried to use watchdog reset to init firmware when usb connection is broken. I will check the connection periodically from host software and clear a flag. If flag is not cleared IC will get into watchdog reset. This does not cause re-connect with usb hence no sound for disconnect - connect of usb device. Any idea about this solution is very appreciated. <br />Saltuka<p>Statistics: Posted by Guest — Sun Sep 27, 2009 10:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2009-09-27T17:33:10+02:00</updated>

		<published>2009-09-27T17:33:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11119#p11119</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11119#p11119"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11119#p11119"><![CDATA[
Reseting USB fixes connection problems but connect- disconnect sound in windows is an isue. My quesiton is: Is there a way to<br />disable this sound only for a given VID/PID USB device in Windows.<br /><br />I am using win - usblib as USB driver. May be there is a way to fix this isue from driver.<br /><br /><br />Best regards<br />saltukasaltuka<p>Statistics: Posted by Guest — Sun Sep 27, 2009 5:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2009-09-23T04:18:40+02:00</updated>

		<published>2009-09-23T04:18:40+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11068#p11068</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11068#p11068"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11068#p11068"><![CDATA[
Just an idea,<br /><br />Periodically read a specific message from AVR-USB device. In switch : case of this message refresh a timer. If timer overflows reset the chip.If USB device<br />always works fine the timer should not have chance to overflow hence no reset occurs.<p>Statistics: Posted by Guest — Wed Sep 23, 2009 4:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-09-22T10:30:34+02:00</updated>

		<published>2009-09-22T10:30:34+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11050#p11050</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11050#p11050"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=11050#p11050"><![CDATA[
I can confirm that EMI (Electro Magnetic Interference) is a problem with AVRs. Switching an inductive load can cause the PC disconnect. Analysis has shown that the AVR itself performs kind of half of a reset. Some parts of the chip go into reset status, others don't. I have seen this even on projects without USB connectivity.<br /><br />You can brute-force work around the problem by performing the USB disconnect when you suspect a problem.<br /><br />Other than that, all measures which reduce EMI help. But this is a very complex topic.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Tue Sep 22, 2009 10:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AntonG]]></name></author>
		<updated>2009-09-03T11:47:15+02:00</updated>

		<published>2009-09-03T11:47:15+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3126&amp;p=10818#p10818</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=10818#p10818"/>
		<title type="html"><![CDATA[Re: Lost connection with PC: any way to restore?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3126&amp;p=10818#p10818"><![CDATA[
I don't know how clean is this workaround, but at least it works for me.<br />I just run this every 10s:<br /><br /><div class="codebox"><p>Code: </p><pre><code>USB_INTR_ENABLE &amp;= ~(1 &lt;&lt; USB_INTR_ENABLE_BIT);<br />usbDeviceDisconnect();<br />_delay_ms(500);      // or some other sort of delay<br />usbDeviceConnect();<br />USB_INTR_ENABLE |= (1 &lt;&lt; USB_INTR_ENABLE_BIT);<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2661">AntonG</a> — Thu Sep 03, 2009 11:47 am</p><hr />
]]></content>
	</entry>
	</feed>
