<?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>topic LPC1517, Pin interrupt in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1517-Pin-interrupt/m-p/899617#M36131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i want an external interrupt on PIO0_28.&lt;/P&gt;&lt;P&gt;Here is my configuration:&lt;/P&gt;&lt;P&gt;LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL0 |= (1UL &amp;lt;&amp;lt; 11); //enable clock for MUX&lt;BR /&gt; LPC_INMUX-&amp;gt;PINTSEL[3] = 0x10; //Pin interrupt select register (PI0_28)&lt;BR /&gt; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL0 |= (1UL &amp;lt;&amp;lt; 18); //enable clock for PINT&lt;BR /&gt; LPC_SYSCON-&amp;gt;STARTERP0 |= (1UL &amp;lt;&amp;lt; 10); //enable PINT3 (GPIO pin interrupt 3 wake-up)&lt;BR /&gt; LPC_PINT-&amp;gt;ISEL = 0x08; //edge sensitive&lt;BR /&gt; LPC_PINT-&amp;gt;IENR = 0x08; //enable interrupt PINTSEL3&lt;BR /&gt; LPC_PINT-&amp;gt;SIENR = 0x08; //set interrupt&amp;nbsp;&lt;BR /&gt;&amp;nbsp;LPC_PINT-&amp;gt;IST = 0x08; //clear flag rising or falling edge&lt;BR /&gt; NVIC_EnableIRQ(PIN_INT3_IRQn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And on my interrupt file, i have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void PIN_INT3_IRQHandler()&lt;BR /&gt;{&lt;BR /&gt; LPC_PINT-&amp;gt;IST = 0x08; //clear flag rising or falling edge&lt;BR /&gt; powerDown ^= 1;&lt;BR /&gt; GPIO_SetPin ( OUT_DIG2, powerDown );&amp;nbsp;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My OUT_DIG2 output pin dont toggle!!! Mean no interrupt when i change the input level on PIO0,28&lt;/P&gt;&lt;P&gt;Do i miss something???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for your helps :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 May 2019 13:41:27 GMT</pubDate>
    <dc:creator>martin_pelletie</dc:creator>
    <dc:date>2019-05-17T13:41:27Z</dc:date>
    <item>
      <title>LPC1517, Pin interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1517-Pin-interrupt/m-p/899617#M36131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i want an external interrupt on PIO0_28.&lt;/P&gt;&lt;P&gt;Here is my configuration:&lt;/P&gt;&lt;P&gt;LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL0 |= (1UL &amp;lt;&amp;lt; 11); //enable clock for MUX&lt;BR /&gt; LPC_INMUX-&amp;gt;PINTSEL[3] = 0x10; //Pin interrupt select register (PI0_28)&lt;BR /&gt; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL0 |= (1UL &amp;lt;&amp;lt; 18); //enable clock for PINT&lt;BR /&gt; LPC_SYSCON-&amp;gt;STARTERP0 |= (1UL &amp;lt;&amp;lt; 10); //enable PINT3 (GPIO pin interrupt 3 wake-up)&lt;BR /&gt; LPC_PINT-&amp;gt;ISEL = 0x08; //edge sensitive&lt;BR /&gt; LPC_PINT-&amp;gt;IENR = 0x08; //enable interrupt PINTSEL3&lt;BR /&gt; LPC_PINT-&amp;gt;SIENR = 0x08; //set interrupt&amp;nbsp;&lt;BR /&gt;&amp;nbsp;LPC_PINT-&amp;gt;IST = 0x08; //clear flag rising or falling edge&lt;BR /&gt; NVIC_EnableIRQ(PIN_INT3_IRQn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And on my interrupt file, i have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void PIN_INT3_IRQHandler()&lt;BR /&gt;{&lt;BR /&gt; LPC_PINT-&amp;gt;IST = 0x08; //clear flag rising or falling edge&lt;BR /&gt; powerDown ^= 1;&lt;BR /&gt; GPIO_SetPin ( OUT_DIG2, powerDown );&amp;nbsp;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My OUT_DIG2 output pin dont toggle!!! Mean no interrupt when i change the input level on PIO0,28&lt;/P&gt;&lt;P&gt;Do i miss something???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for your helps :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2019 13:41:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1517-Pin-interrupt/m-p/899617#M36131</guid>
      <dc:creator>martin_pelletie</dc:creator>
      <dc:date>2019-05-17T13:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1517, Pin interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1517-Pin-interrupt/m-p/899618#M36132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally i found my problem :smileyhappy:&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;SPAN&gt;PDAWAKECFG register need to be well configured!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here is my code if i can help some one !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got an interrupt each time i make an edge on PIO0.28&lt;/P&gt;&lt;P&gt;And if my system is in deep sleep, it will wake up after this interrupt!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//initialisation PINT0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;//clear flag 23may19&lt;BR /&gt; LPC_PMU-&amp;gt;PCON |= (1UL &amp;lt;&amp;lt; 8); //clear sleep flag&lt;BR /&gt; LPC_PMU-&amp;gt;PCON |= (1UL &amp;lt;&amp;lt; 11); //clear dpd flag&lt;BR /&gt; &lt;BR /&gt; LPC_SYSCON-&amp;gt;&lt;STRONG&gt;PDAWAKECFG&lt;/STRONG&gt; &amp;amp;= ~(1UL &amp;lt;&amp;lt; 21);&amp;nbsp; &amp;nbsp; &amp;nbsp;//active Sys_OSC after Deep sleep or Power down&lt;BR /&gt; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL0 |= (1UL &amp;lt;&amp;lt; 11); //enable&amp;nbsp;PINT&lt;BR /&gt; LPC_INMUX-&amp;gt;PINTSEL[0] = 0x1C; //Pin interrupt select register for PIO0_28&lt;BR /&gt; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL0 |= (1UL &amp;lt;&amp;lt; 18); //enable clock for PINT&lt;BR /&gt; LPC_SYSCON-&amp;gt;STARTERP0 |= (1UL &amp;lt;&amp;lt; 7); //enable PINT0 (GPIO pin interrupt 0 wake-up)&lt;BR /&gt; LPC_PINT-&amp;gt;ISEL = 0x00; //edge sensitive or 0x01; //level sensitive&lt;BR /&gt; LPC_PINT-&amp;gt;IENR = 0x01; //enable interrupt PINTSEL0 pio0_28&lt;BR /&gt; LPC_PINT-&amp;gt;SIENR = 0x01; //set interrupt&lt;BR /&gt; LPC_PINT-&amp;gt;IENF = 0x01;&lt;BR /&gt; LPC_PINT-&amp;gt;SIENF = 0x01;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NVIC_EnableIRQ(PIN_INT0_IRQn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (delayWakeup &amp;gt;= 25)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;delayWakeup = 0;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;(*romAPI)-&amp;gt;pPWRD-&amp;gt;power_mode_configure(1, 0); //DEEP SLEEP mode&lt;BR /&gt;&amp;nbsp; &amp;nbsp;__WFI();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In my interrupt.c file :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//i toggle an output each time i got an Pin interrupt on PIO0.28&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;void PIN_INT0_IRQHandler()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; LPC_PINT-&amp;gt;IST = 0x01; //clear flag rising or falling edge&lt;BR /&gt;&amp;nbsp; powerDown ^= 1;&lt;BR /&gt;&amp;nbsp; GPIO_SetPin ( OUT_DIG2, powerDown );&amp;nbsp;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2019 19:55:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1517-Pin-interrupt/m-p/899618#M36132</guid>
      <dc:creator>martin_pelletie</dc:creator>
      <dc:date>2019-05-24T19:55:08Z</dc:date>
    </item>
  </channel>
</rss>

