<?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/1282" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-04-23T09:30:15+02:00</updated>

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

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-04-23T09:30:15+02:00</updated>

		<published>2008-04-23T09:30:15+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5150#p5150</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5150#p5150"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5150#p5150"><![CDATA[
You don't need USB_CFG_PULLUP_IOPORTNAME in the most recent releases of the driver in order to use usbDeviceDisconnect() and usbDeviceConnect().<br /><br />1.95 V is far below the limit of 2.5 V. Please use higher voltage and lower power diodes. You should reach AT LEAST 2.5 V.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Wed Apr 23, 2008 9:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[centrino]]></name></author>
		<updated>2008-04-22T23:52:20+02:00</updated>

		<published>2008-04-22T23:52:20+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5146#p5146</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5146#p5146"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5146#p5146"><![CDATA[
<blockquote><div><cite>christian wrote:</cite>3.3 V Zener diodes are not a very good idea. Can you please measure the voltage level on D-? Is it well above 2.5 V?</div></blockquote><br /><br />Yes, I have measured. Between VCC and D- voltage 3.15V, between GND and D- voltage 1.95V. It is normal? No?<br />Also before your post I have changed connection 1.5K pullup resistor from VCC to pin on MCU and change firmware as it was recommended earlier:<br /><br /><div class="codebox"><p>Code: </p><pre><code>int main&#40;void&#41;<br />&#123;<br />    uchar i;<br />    usbInit&#40;&#41;;<br />    /* enforce USB re-enumerate: */<br />    usbDeviceDisconnect&#40;&#41;;  /* do this while interrupts are disabled */<br />    for&#40;i=0;--i;&#41;&#123;          /* fake USB disconnect for &gt; 250 ms */<br />        _delay_ms&#40;1&#41;;<br />    &#125;<br />    usbDeviceConnect&#40;&#41;;<br />    ....<br />    sei&#40;&#41;;<br />    for&#40;;;&#41;&#123; /* main loop */<br />        usbPoll&#40;&#41;;<br />        ....<br />    &#125;<br />&#125;<br /></code></pre></div><br /><br />defined USB_CFG_PULLUP_IOPORTNAME, USB_CFG_PULLUP_BIT also.<br /><br />it has worked some days, and I was already happy, but... again all has repeated.<br />One more interesting thing. The program(firmware) thus works, as the light-emitting diode blinks in cycle... but usb-connection is down.<br /><br />Thanks for help, christian.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1022">centrino</a> — Tue Apr 22, 2008 11:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-04-21T10:39:01+02:00</updated>

		<published>2008-04-21T10:39:01+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5121#p5121</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5121#p5121"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5121#p5121"><![CDATA[
3.3 V Zener diodes are not a very good idea. Can you please measure the voltage level on D-? Is it well above 2.5 V?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Apr 21, 2008 10:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[centrino]]></name></author>
		<updated>2008-04-19T00:34:41+02:00</updated>

		<published>2008-04-19T00:34:41+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5107#p5107</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5107#p5107"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5107#p5107"><![CDATA[
I have similar problem too.<br />My board with mega8 mcu used for retrieve data from dallas 1-wire temperature sensor and next to computer. I'am use &quot;commandline&quot; program from powerswitch distributive with some tiny changes. About 5-10 hours it's works is fine then i have -<br />&quot;Warning: cannot query manufacturer for device: error sending control message: Input/output error&quot;.<br />Used OS - FreeBSD 7.0-STABLE.<br />In system logs no messages about connect/disconnect.<br />Only disconnect and connect by hand enables board for further operate...<br />I'am use zener diode on D+ and D-... hmm 3.3v.<br /><br />and i'am use usb drivers from last powerswitch (2008-02-28)<br /><br />P.S.: Sorry for bad english.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1022">centrino</a> — Sat Apr 19, 2008 12:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-04-14T20:16:34+02:00</updated>

		<published>2008-04-14T20:16:34+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5042#p5042</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5042#p5042"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5042#p5042"><![CDATA[
Newer versions of PowerSwitch use the delay function (eith a much longer delay, BTW) instead.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Apr 14, 2008 8:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spiff]]></name></author>
		<updated>2008-04-14T20:14:45+02:00</updated>

		<published>2008-04-14T20:14:45+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5040#p5040</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5040#p5040"/>
		<title type="html"><![CDATA[Re: same problem here]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=5040#p5040"><![CDATA[
<blockquote><div><cite>xtremely wrote:</cite><div class="codebox"><p>Code: </p><pre><code>    while &#40;--j&#41; &#123;               /* USB Reset by device only required on<br />                                   Watchdog Reset */<br />        i = 0;<br />        while &#40;--i&#41;;            /* delay &gt;10ms for USB reset */<br />    &#125;<br /></code></pre></div><br /></div></blockquote><br />I have seen many problems with this construction after switching to a newer avr-gcc (based on gcc4). The delay loops get optimized away. Use _delay_ms from util/delay.h instead.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=226">spiff</a> — Mon Apr 14, 2008 8:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iphi]]></name></author>
		<updated>2008-04-08T09:45:21+02:00</updated>

		<published>2008-04-08T09:45:21+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4945#p4945</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4945#p4945"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4945#p4945"><![CDATA[
If you use new AVR chip types make sure to switch off the watchdog timer before reenumeration as the late AVR MCUs don't switch off the watchdog on reset. If the watchdog is still running after a reset, reenumeration will fail.<br /><br />See my posting here for details:<br /><a href="http://forums.obdev.at/viewtopic.php?t=1202" class="postlink">http://forums.obdev.at/viewtopic.php?t=1202</a><br /><br />Tom<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=292">iphi</a> — Tue Apr 08, 2008 9:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-03-28T14:56:46+02:00</updated>

		<published>2008-03-28T14:56:46+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4804#p4804</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4804#p4804"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4804#p4804"><![CDATA[
<blockquote class="uncited"><div>So it is normal that my device might dsconnect and then connect again without getting into trouble with the client program sending commands to the device? <br /></div></blockquote><br />No, this is not normal. But IF you get these resets, you can at least fight the symptom and write the firmware, driver and application so that a reconnect is possible.<br /><br />We now recommend the following sequence (requires the newest driver version so that usbDevice[Dis]connect() works as it should):<br /><br /><div class="codebox"><p>Code: </p><pre><code>int main&#40;void&#41;<br />&#123;<br />    uchar i;<br />    usbInit&#40;&#41;;<br />    /* enforce USB re-enumerate: */<br />    usbDeviceDisconnect&#40;&#41;;  /* do this while interrupts are disabled */<br />    for&#40;i=0;--i;&#41;&#123;          /* fake USB disconnect for &gt; 250 ms */<br />        _delay_ms&#40;1&#41;;<br />    &#125;<br />    usbDeviceConnect&#40;&#41;;<br />    ....<br />    sei&#40;&#41;;<br />    for&#40;;;&#41;&#123; /* main loop */<br />        usbPoll&#40;&#41;;<br />        ....<br />    &#125;<br />&#125;<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Fri Mar 28, 2008 2:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-03-28T12:41:36+02:00</updated>

		<published>2008-03-28T12:41:36+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4802#p4802</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4802#p4802"/>
		<title type="html"><![CDATA[same problem here]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4802#p4802"><![CDATA[
hi<br />I got the same problem here. I removed the zener diodes, but my device is still not reachable after about half an hour.<br /><blockquote class="uncited"><div>If your firmware restarts at main(), you must have some kind of reset. This can be a brownout-reset, a watchdog reset or a spike on the supply line or RESET line which causes a hardware reset. </div></blockquote><br />So it is normal that my device might dsconnect and then connect again without getting into trouble with the client program sending commands to the device?<br /><br /><blockquote class="uncited"><div>This disconnect should last for at least several 100 ms so that the host detects it reliably. Old reference projects had only a couple of milliseconds and many example projects still have this short disconnect period. </div></blockquote><br /><br />in the code I can see this part:<br /><div class="codebox"><p>Code: </p><pre><code>int main&#40;void&#41; &#123;<br />    uchar i, j;<br />    odDebugInit&#40;&#41;;<br />    DDRD = ~0;                  /* output SE0 for USB reset */<br />    PORTD = 0x00;               /* no pullups on USB pins */<br />    DDRC = 0xff;                /* all outputs */<br />    PORTC = 0x00;<br /><br />    j = 0;<br />    while &#40;--j&#41; &#123;               /* USB Reset by device only required on<br />                                   Watchdog Reset */<br />        i = 0;<br />        while &#40;--i&#41;;            /* delay &gt;10ms for USB reset */<br />    &#125;<br />    DDRD = ~USBMASK;            /* all outputs except USB data */<br />    TCCR0 = 5;                  /* set prescaler to 1/1024 */<br />    usbInit&#40;&#41;;<br />    sei&#40;&#41;;</code></pre></div><br />should I try to replace the while (--i); with a delay for about 200ms? (sry but i'm quite new to microcontrollers and programming stuff)<p>Statistics: Posted by Guest — Fri Mar 28, 2008 12:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-03-17T12:37:10+02:00</updated>

		<published>2008-03-17T12:37:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4631#p4631</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4631#p4631"/>
		<title type="html"><![CDATA[AVR_USB timing out?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1282&amp;p=4631#p4631"><![CDATA[
That should be OK. Maybe the pull-up is too high?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Mar 17, 2008 12:37 pm</p><hr />
]]></content>
	</entry>
	</feed>
