<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックInterrupt both edges on 13xx</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-both-edges-on-13xx/m-p/525005#M7641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mozmck on Tue Aug 27 17:23:47 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm moving a project from an LPC1114 to a LPC1347 chip, and I'm not sure how to set up a pin interrupt to interrupt on both edges - rising and falling edges.&amp;nbsp; Can I set it up so both rising and falling edge interrupts go to the same pin interrupt handler?&amp;nbsp; In the LPC1114 this was easy and straight-forward, but in the 13xx chips it is not clear and the sample code does not show any way to do it at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like I should be able to just set the correct bit in both the IENF and IENR registers to enable both edges - will this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:55:15 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:55:15Z</dc:date>
    <item>
      <title>Interrupt both edges on 13xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-both-edges-on-13xx/m-p/525005#M7641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mozmck on Tue Aug 27 17:23:47 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm moving a project from an LPC1114 to a LPC1347 chip, and I'm not sure how to set up a pin interrupt to interrupt on both edges - rising and falling edges.&amp;nbsp; Can I set it up so both rising and falling edge interrupts go to the same pin interrupt handler?&amp;nbsp; In the LPC1114 this was easy and straight-forward, but in the 13xx chips it is not clear and the sample code does not show any way to do it at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like I should be able to just set the correct bit in both the IENF and IENR registers to enable both edges - will this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:55:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-both-edges-on-13xx/m-p/525005#M7641</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt both edges on 13xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-both-edges-on-13xx/m-p/525006#M7642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tha on Wed Aug 28 16:51:01 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Mozmck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, the pin interrupt will work with rising and falling edge.&amp;nbsp; You can use this little code snippet to test it out yourself:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#include "LPC13Uxx.h"/* LPC13Uxx Peripheral Registers */
#include "gpio.h"

int main (void)
{
&amp;nbsp; GPIOInit();

&amp;nbsp; /* use port0_1 as input event, interrupt test. */
&amp;nbsp; GPIOSetDir( PORT0, 1, 0 );
&amp;nbsp; /* channel 0, port0, bit 1, edge trigger, rising edge. */
&amp;nbsp; //Set P0_1 detect rising edge
&amp;nbsp; GPIOSetPinInterrupt( 0, 0, 1, 0, 1 );
&amp;nbsp; //Now set it for falling edge also
&amp;nbsp; LPC_GPIO_PIN_INT-&amp;gt;IENF |= (0x1&amp;lt;&amp;lt;0);/* faling edge */

&amp;nbsp; GPIOPinIntEnable( 0, 1 );
&amp;nbsp; while(1);
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can monitor which edge is detected by setting a break point inside the PIN_INT0_IRQHandler() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The gpio.c file and gpio.h is from the code bundle.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:55:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-both-edges-on-13xx/m-p/525006#M7642</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt both edges on 13xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-both-edges-on-13xx/m-p/525007#M7643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mozmck on Wed Aug 28 18:36:22 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, I thought that might work but was not sure.&amp;nbsp; I'll have boards to test with in a few days but thought I'd ask first and maybe save some time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:55:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-both-edges-on-13xx/m-p/525007#M7643</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:55:16Z</dc:date>
    </item>
  </channel>
</rss>

