<?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 Re: Interrupt on both edges and measure time between them in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-on-both-edges-and-measure-time-between-them/m-p/1150892#M42172</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/145996" target="_self"&gt;esam_me&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Please check how do you config this register:&amp;nbsp;GPIO interrupt both edges sense register&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Sep 2020 07:07:25 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2020-09-09T07:07:25Z</dc:date>
    <item>
      <title>Interrupt on both edges and measure time between them</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-on-both-edges-and-measure-time-between-them/m-p/1150569#M42166</link>
      <description>&lt;P&gt;I need to set an interrupt on pio0_6 for falling and rising edges and then measure time between them to achieve a long an a short press from a push button.&lt;/P&gt;&lt;P&gt;this is my current code which works only for one edge:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#include "gpio.h"
#include "LPC11xx.h"
int main(){

   GPIOInit();
   GPIOSetDir(PORT0, 6, 0);// interrupt button- input
   GPIOSetInterrupt(PORT0, 6, 0, 0, 1); //Set interrupt on pio0_6
   GPIOIntEnable(PORT0, 6);

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for the IRQ handler in gpio.h:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void PIOINT0_IRQHandler(void)
{
  uint32_t regVal;

  regVal = GPIOIntStatus( PORT0, 6);// measure pin
  if ( regVal )
  {
	timerInt = 0; //reset inactivity timeout timer 
	modeInt = 1;
	GPIOIntClear( PORT0, 6);
  }
  return;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MCu is LPC1114&lt;/P&gt;&lt;UL class="iw-contextMenu iw-created iw-cm-menu"&gt;&lt;LI&gt;Im Wörterbuch speichern&lt;DIV class="iw-cm-arrow-right"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;UL class="iw-contextMenu iw-created iw-cm-menu"&gt;&lt;LI&gt;Keine Wortliste für Englisch -&amp;gt; Arabisch...&lt;DIV class="iw-mOverlay"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Eine neue Wortliste erstellen...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Kopieren&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 08 Sep 2020 20:21:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-on-both-edges-and-measure-time-between-them/m-p/1150569#M42166</guid>
      <dc:creator>esam_me</dc:creator>
      <dc:date>2020-09-08T20:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt on both edges and measure time between them</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-on-both-edges-and-measure-time-between-them/m-p/1150892#M42172</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/145996" target="_self"&gt;esam_me&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Please check how do you config this register:&amp;nbsp;GPIO interrupt both edges sense register&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 07:07:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-on-both-edges-and-measure-time-between-them/m-p/1150892#M42172</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-09-09T07:07:25Z</dc:date>
    </item>
  </channel>
</rss>

