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

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

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

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-05-04T22:23:38+02:00</updated>

		<published>2008-05-04T22:23:38+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1422&amp;p=5240#p5240</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1422&amp;p=5240#p5240"/>
		<title type="html"><![CDATA[Atmega128 restarts]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1422&amp;p=5240#p5240"><![CDATA[
Have you enabled the watchdog? Please note that newer devices don't reset the watchdog during a CPU reset. Once it is enabled, it stays enabled until explicitly disabled.<br /><br />usbInit() can't crash, it just initializes some registers. Maybe sei() causes the crash, an interrupt may be enabled which has no vector set.<br /><br />How do you know it restarts? And how do you know it restarts when you call usbInit()?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Sun May 04, 2008 10:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sir]]></name></author>
		<updated>2008-05-03T18:37:44+02:00</updated>

		<published>2008-05-03T18:37:44+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1422&amp;p=5234#p5234</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1422&amp;p=5234#p5234"/>
		<title type="html"><![CDATA[Atmega128 restarts]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1422&amp;p=5234#p5234"><![CDATA[
Hi, <br /><br />I have a problem with Atmega128 and AVR-USB. When I call usbInit() my AVR restarts.<br /><br />Schematic: <!-- w --><a class="postlink" href="http://www.exsports.info/sch.JPG">www.exsports.info/sch.JPG</a><!-- w --><br />UsbConfig: <!-- w --><a class="postlink" href="http://www.exsports.info/usbconfig.h">www.exsports.info/usbconfig.h</a><!-- w --><br />Code:<br /><div class="codebox"><p>Code: </p><pre><code>int main&#40;void&#41;<br />&#123;<br />   PORTD = 0;<br />   DDRD = 0b11111000;<br /><br />   usbInit&#40;&#41;;<br /><br />   sei&#40;&#41;;<br />   for&#40;;;&#41;&#123;<br />      usbPoll&#40;&#41;;<br />   &#125;<br />   return 0;<br />&#125;<br /></code></pre></div><br /><br />In my board R17 and R18 (from schematic) are 100Ohm instead of 68Ohm. Fuse bits configuration is in my opinion OK (0xEF 0x99 0xFd). I'm using 12Mhz crystal.<br /><br />Sorry for my English and thanks for help.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1067">sir</a> — Sat May 03, 2008 6:37 pm</p><hr />
]]></content>
	</entry>
	</feed>
