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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-12-07T21:53:51+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-12-07T21:53:51+02:00</updated>

		<published>2010-12-07T21:53:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16949#p16949</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16949#p16949"/>
		<title type="html"><![CDATA[Re: HW interrupt problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16949#p16949"><![CDATA[
<blockquote><div><cite>maxi wrote:</cite> you must call usbPoll() at least once every 50 ms.</div></blockquote><br /><br />How silly of me. Thanks for pointing out the obvious  <img class="smilies" src="./../../../images/smilies/icon_redface.gif" alt=":oops:" title="Embarassed" /> <br />Back to the drawing board for my FW design.<p>Statistics: Posted by Guest — Tue Dec 07, 2010 9:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maxi]]></name></author>
		<updated>2010-12-07T21:47:36+02:00</updated>

		<published>2010-12-07T21:47:36+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16948#p16948</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16948#p16948"/>
		<title type="html"><![CDATA[Re: HW interrupt problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16948#p16948"><![CDATA[
<blockquote><div><cite>Anonymous2 wrote:</cite> Am I doing something wrong, or is this as specified? </div></blockquote><br />Yes, the 250 ms delay in an interrupt service routine is a BIG no no, regardless of the fact that the you must call usbPoll() at least once every 50 ms.  Better increment a (volatile)global counter and toggleGreen every so many iterations.<br /><br />Hope it helps<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2570">maxi</a> — Tue Dec 07, 2010 9:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-12-07T00:03:59+02:00</updated>

		<published>2010-12-07T00:03:59+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16935#p16935</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16935#p16935"/>
		<title type="html"><![CDATA[HW interrupt problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5217&amp;p=16935#p16935"><![CDATA[
Hello all,<br /><br />I try to use v-usb in a project where I need HW interrupts for the ATMega. I use a modified 'custom-class' project. The USB is connected to INT0 and it works nicely.<br /><br />In INT1 I have a peripheral system that can cause an interrupt. As an interrupt service I have (it is dummy for now)<br /><div class="codebox"><p>Code: </p><pre><code>ISR( INT1_vect, ISR_NOBLOCK )<br />{<br />        toggleGreen();<br />        _delay_ms(250);<br />}</code></pre></div><br />And yes, I can toggle the green led with the external interrupt.<br /><br />Now, if I cause INT1-interrupts then <strong class="text-strong">occasionally</strong> my PC's host program won't find the USB device.<br /><ul>Could not find USB device &quot;LEDControl&quot; with vid=0x16c0 pid=0x5dc<br /></ul>I run the 'set-led' program in a tight loop  in the PC.<br /><br />So it seems that the INT0 (USB) cannot override the INT1(external). Despite the ATMega docs saying it should. AVR-libc docs say passing ISR_NOBLOCK to the ISR function should not disable interrupts. Am I doing something wrong, or is this as specified?<br /><br />thanks<p>Statistics: Posted by Guest — Tue Dec 07, 2010 12:03 am</p><hr />
]]></content>
	</entry>
	</feed>
