<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MCB2300: GPIO Interrupt Problems</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24883/mcb2300-gpio-interrupt-problems</link><description> 
Hi everyone, 

 
I&amp;#39;m new to programming with a MCB2300(LPC2378), and I&amp;#39;m having a
little bit of trouble figuring out how to get the GPIO interrupts to
work. 

 
I&amp;#39;m trying to detect a rising edge on p2.6; if a rising edge is
detected I turn on just</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: MCB2300: GPIO Interrupt Problems</title><link>https://community.arm.com/thread/114763?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2009 13:51:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cd282385-7488-4449-80aa-715b72026f9d</guid><dc:creator>John Jacobs</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks for all of your help so far, I just got back from break and
attempted to implement the changes that you suggested, and I wasn&amp;#39;t
successful. Here is the code that I&amp;#39;m using, can you take a look and
see if you can spot the problem? I&amp;#39;m still just trying to see if the
program is detecting a rising edge coming into pin 2.6.&lt;/p&gt;

&lt;pre&gt;
int main()
{
 FIO2MASK0=0x00;
 FIO2DIR0=0x03;
 IO0_INT_EN_R=0x00000040;
 while(1)
 {
 if(IO0_INT_STAT_R &amp;amp;= 0x00000040)
 {
    FIO2PIN0=1;
    IO0_INT_CLR=0x00000040;
 }
 else
   FIO2PIN0=2;
 }
}
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCB2300: GPIO Interrupt Problems</title><link>https://community.arm.com/thread/101706?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2009 04:46:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2ddab518-2ad3-4dcd-bbf7-70c415df0219</guid><dc:creator>Per Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
When using IO_INT_STATE, you shouldn&amp;#39;t compare with a value. You
should instead look for a specific bit and not assume that you know
the state of any other bits.&lt;/p&gt;

&lt;p&gt;
And you should make use of IO0IntClr or IO2IntClr to clear the
interrupt state for the specific input pin after having detected the
flank change.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCB2300: GPIO Interrupt Problems</title><link>https://community.arm.com/thread/77263?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2009 03:41:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9b3aa6f9-6951-4b00-9aeb-a4bb58057305</guid><dc:creator>John Jacobs</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks for the reply. I was going to do both, after I checked that
this was working (I assumed that the IO_INT_STAT register would
change without having a specific call to an isr). Will the register
not be changed on an interrupt without those two steps?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCB2300: GPIO Interrupt Problems</title><link>https://community.arm.com/thread/55609?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2009 00:51:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6d7a1819-06dc-4544-82df-88f78a8206d4</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
1) Were you not planning on using any interrupt handler?&lt;/p&gt;

&lt;p&gt;
2) No plan to clear the interrupt state? The user manual says for
the EXTINT register that: &amp;quot;This bit is cleared by writing a one to
it, except in leven sensitive mode when the in is in its active
state.&amp;quot;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>