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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2013-06-03T12:28:14+02:00</updated>

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

		<entry>
		<author><name><![CDATA[EmbeddedCreations]]></name></author>
		<updated>2013-06-03T12:28:14+02:00</updated>

		<published>2013-06-03T12:28:14+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8470&amp;p=25354#p25354</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8470&amp;p=25354#p25354"/>
		<title type="html"><![CDATA[Re: USB_SOF_HOOK macro executed twice per SOF]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8470&amp;p=25354#p25354"><![CDATA[
I was able to trace this back to using the pin-change interrupt instead of INT0.  The interrupt is executed on any change to the pin, not just on the rising edge of the signal that is normally used, and so two interrupts are generated by the SOF pulse.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=6720">EmbeddedCreations</a> — Mon Jun 03, 2013 12:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[EmbeddedCreations]]></name></author>
		<updated>2013-06-03T11:26:44+02:00</updated>

		<published>2013-06-03T11:26:44+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8470&amp;p=25353#p25353</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8470&amp;p=25353#p25353"/>
		<title type="html"><![CDATA[USB_SOF_HOOK macro executed twice per SOF]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8470&amp;p=25353#p25353"><![CDATA[
I'm trying to get the alternate oscialltor calibration routine using the timer working in my application, and was running into some weird issues.  I found that the USB_SOF_HOOK was being executed twice per frame, a couple microseconds apart when there is no data, or separated further if there is data.<br /><br />In these captures, I have the USB_SOF_HOOK macro set to toggle the state of the &quot;DEBUG2&quot; line.  I'm using the hid-mouse application with a attiny85 running at 16.5MHz, calibrated using osccal.o<br /><br /><img src="https://dl.dropboxusercontent.com/u/1682445/dpmatrixpost/vusbSOF1.png" class="postimage" alt="Image" /><br /><img src="https://dl.dropboxusercontent.com/u/1682445/dpmatrixpost/vusbSOF2.png" class="postimage" alt="Image" /><br /><br />Has anyone seen this behavior?  I'm trying to keep the USB_SOF_HOOK macro as short as possible, but now it seems I'll have to add some check to make sure the code is executed only once per frame.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=6720">EmbeddedCreations</a> — Mon Jun 03, 2013 11:26 am</p><hr />
]]></content>
	</entry>
	</feed>
