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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2012-08-08T09:27:27+02:00</updated>

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

		<entry>
		<author><name><![CDATA[obrubov]]></name></author>
		<updated>2012-08-08T09:27:27+02:00</updated>

		<published>2012-08-08T09:27:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=6929&amp;p=22396#p22396</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=6929&amp;p=22396#p22396"/>
		<title type="html"><![CDATA[Tiny45 USB device not recognized after a reboot (solution)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=6929&amp;p=22396#p22396"><![CDATA[
When I developed device based on the Tiny45,  I encountered a problem:<br /> Windows could not recognize it after a reboot. It was recognizeed only after reconnecting.<br /> I solved this problem by adding the following code:<br /><div class="codebox"><p>Code: </p><pre><code># include &lt;avr/wdt.h&gt; / / connect the library, watch dog timer<br />....<br />int main (void / / Start of program<br />{<br />   ......<br />   wdt_enable (WDTO_8S); / / give the command to restart the controller through 8 s, if WDT not reseted<br />   for (; ;) {/ * start the main program loop * /<br />       if (usbConfiguration! = 0) wdt_reset (); / / reset wd_timer if device connected to the USB and recognized by OS<br />       ..........<br />   }<br />}</code></pre></div><br /><br />That is, after starting the controller checks the value of  usbConfiguration, if it is nonzero, <br />then the connection is successfully established  and you can reset WDT.<br /> If within 8 seconds, the device is not determined by the system, it goes to reboot.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=7193">obrubov</a> — Wed Aug 08, 2012 9:27 am</p><hr />
]]></content>
	</entry>
	</feed>
