<?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中的主题 LPC1768 External Interrupt both edges (LPCOpen)</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-External-Interrupt-both-edges-LPCOpen/m-p/578516#M19845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rosfudum on Fri Nov 06 07:23:45 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to set external interrupt on one pin of LPC1768 in both direction, rising and falling. but I've got just two functions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIOINT_SetIntFalling&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIOINT_SetIntRising&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case of LPC1115, there is a function called Chip_GPIO_SetupPinInt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where you can pass GPIO_INT_BOTH_EDGES as parameter so, both edges are covered by interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case I use first Falling and then Rising, Interrupt request will be called in both edges (so functions are in OR) or last setting "win" and just rising edges occurs an interrupt?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case of second condition, is there any (softwre) workaround to catch both edges?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:19:33 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:19:33Z</dc:date>
    <item>
      <title>LPC1768 External Interrupt both edges (LPCOpen)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-External-Interrupt-both-edges-LPCOpen/m-p/578516#M19845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rosfudum on Fri Nov 06 07:23:45 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to set external interrupt on one pin of LPC1768 in both direction, rising and falling. but I've got just two functions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIOINT_SetIntFalling&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_GPIOINT_SetIntRising&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case of LPC1115, there is a function called Chip_GPIO_SetupPinInt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where you can pass GPIO_INT_BOTH_EDGES as parameter so, both edges are covered by interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case I use first Falling and then Rising, Interrupt request will be called in both edges (so functions are in OR) or last setting "win" and just rising edges occurs an interrupt?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case of second condition, is there any (softwre) workaround to catch both edges?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:19:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-External-Interrupt-both-edges-LPCOpen/m-p/578516#M19845</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 External Interrupt both edges (LPCOpen)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-External-Interrupt-both-edges-LPCOpen/m-p/578517#M19846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Fri Nov 06 08:52:21 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Rosfudum&lt;/STRONG&gt;&lt;BR /&gt;Chip_GPIOINT_SetIntFalling&lt;BR /&gt;or&lt;BR /&gt;Chip_GPIOINT_SetIntRising&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Come on, what do you think is happening if you set rising and falling&amp;nbsp;&amp;nbsp; :quest: &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:19:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-External-Interrupt-both-edges-LPCOpen/m-p/578517#M19846</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 External Interrupt both edges (LPCOpen)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-External-Interrupt-both-edges-LPCOpen/m-p/578518#M19847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by miccio on Fri Nov 06 10:29:20 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCOpen code claims:&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;
STATIC INLINE void Chip_GPIOINT_SetIntFalling(LPC_GPIOINT_T *pGPIOINT, LPC_GPIOINT_PORT_T port, uint32_t pins)
{
if (port == GPIOINT_PORT0) {
pGPIOINT-&amp;gt;IO0.ENF = pins;
} else {
pGPIOINT-&amp;gt;IO2.ENF = pins;
}
}

STATIC INLINE void Chip_GPIOINT_SetIntRising(LPC_GPIOINT_T *pGPIOINT, LPC_GPIOINT_PORT_T port, uint32_t pins)
{
if (port == GPIOINT_PORT0) {
pGPIOINT-&amp;gt;IO0.ENR = pins;
} else {
pGPIOINT-&amp;gt;IO2.ENR = pins;
}
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd also take a wild guess and assume it's possible to set both registers. Maybe you could add this to your inc/gpioint_17xx_40.h file:&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;
STATIC INLINE void Chip_GPIOINT_SetIntAnyEdge(LPC_GPIOINT_T *pGPIOINT, LPC_GPIOINT_PORT_T port, uint32_t pins)
{
if (port == GPIOINT_PORT0) {
pGPIOINT-&amp;gt;IO0.ENR = pins;
pGPIOINT-&amp;gt;IO0.ENF = pins;
} else {
pGPIOINT-&amp;gt;IO2.ENR = pins;
pGPIOINT-&amp;gt;IO2.ENF = pins;
}
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:19:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-External-Interrupt-both-edges-LPCOpen/m-p/578518#M19847</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:19:34Z</dc:date>
    </item>
  </channel>
</rss>

