<?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 GPIO interrupt triggers only once in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-interrupt-triggers-only-once/m-p/695541#M17503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ISR of a gpio interrupt triggers only once. I cleared the interrupt flag in the ISR and the interrupts are not disabled anywhere in the code. Does anyone how I can solve that issue? (I am using MQX 4.2 and the Vybrid VF61 Cortex M4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interrupt initialisation:&lt;/P&gt;&lt;P&gt;void gpio_init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static LWGPIO_STRUCT temp_gpio;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_init(&amp;amp;temp_gpio,&amp;nbsp;LWGPIO_PTE14, LWGPIO_DIR_INPUT, LWGPIO_VALUE_NOCHANGE);&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lwgpio_set_functionality(&amp;amp;temp_gpio, 1);&amp;nbsp;&amp;nbsp; /*sets the gpio mux to gpio setting*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_set_attribute(&amp;amp;temp_gpio,&amp;nbsp; LWGPIO_ATTR_OPEN_DRAIN, LWGPIO_AVAL_ENABLE);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_int_init(&amp;amp;temp_gpio, LWGPIO_INT_MODE_FALLING );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_int_install_isr(lwgpio_int_get_vector(&amp;amp;temp_gpio), portE_int_handler , (void *)&amp;amp;temp_gpio);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_bsp_int_init(lwgpio_int_get_vector(&amp;amp;temp_gpio), 3, 0, TRUE);&amp;nbsp; /*initialize the interrupt and set its priority.&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_int_enable(&amp;amp;temp_gpio, TRUE);&amp;nbsp; /*enable the interrupt for use*/&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISR:&lt;/P&gt;&lt;P&gt;static void portE_int_handler(void *pin)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("interrupt happened\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_int_clear_flag((LWGPIO_STRUCT_PTR) pin);&amp;nbsp; &lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Aug 2017 07:57:14 GMT</pubDate>
    <dc:creator>michelhayoz</dc:creator>
    <dc:date>2017-08-10T07:57:14Z</dc:date>
    <item>
      <title>GPIO interrupt triggers only once</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-interrupt-triggers-only-once/m-p/695541#M17503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ISR of a gpio interrupt triggers only once. I cleared the interrupt flag in the ISR and the interrupts are not disabled anywhere in the code. Does anyone how I can solve that issue? (I am using MQX 4.2 and the Vybrid VF61 Cortex M4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interrupt initialisation:&lt;/P&gt;&lt;P&gt;void gpio_init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static LWGPIO_STRUCT temp_gpio;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_init(&amp;amp;temp_gpio,&amp;nbsp;LWGPIO_PTE14, LWGPIO_DIR_INPUT, LWGPIO_VALUE_NOCHANGE);&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lwgpio_set_functionality(&amp;amp;temp_gpio, 1);&amp;nbsp;&amp;nbsp; /*sets the gpio mux to gpio setting*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_set_attribute(&amp;amp;temp_gpio,&amp;nbsp; LWGPIO_ATTR_OPEN_DRAIN, LWGPIO_AVAL_ENABLE);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_int_init(&amp;amp;temp_gpio, LWGPIO_INT_MODE_FALLING );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_int_install_isr(lwgpio_int_get_vector(&amp;amp;temp_gpio), portE_int_handler , (void *)&amp;amp;temp_gpio);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_bsp_int_init(lwgpio_int_get_vector(&amp;amp;temp_gpio), 3, 0, TRUE);&amp;nbsp; /*initialize the interrupt and set its priority.&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_int_enable(&amp;amp;temp_gpio, TRUE);&amp;nbsp; /*enable the interrupt for use*/&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISR:&lt;/P&gt;&lt;P&gt;static void portE_int_handler(void *pin)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("interrupt happened\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lwgpio_int_clear_flag((LWGPIO_STRUCT_PTR) pin);&amp;nbsp; &lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 07:57:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-interrupt-triggers-only-once/m-p/695541#M17503</guid>
      <dc:creator>michelhayoz</dc:creator>
      <dc:date>2017-08-10T07:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO interrupt triggers only once</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-interrupt-triggers-only-once/m-p/695542#M17504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found out that: the IRQC bits in the corresponding port control register PORT3_PCR13 are reset after the interrupt service routine has been executed. The routine "lwgpio_int_enable" restores the register but after a while it gets set to 0 anyway. I had a look at the implementation in the lwgpio_vgpio.c file but I could not find any obvious errors. Does anyone know where and why the register gets reset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 11:32:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-interrupt-triggers-only-once/m-p/695542#M17504</guid>
      <dc:creator>michelhayoz</dc:creator>
      <dc:date>2017-08-10T11:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO interrupt triggers only once</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-interrupt-triggers-only-once/m-p/695543#M17505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very weird. It is hard to locate the cause from your description, maybe resulted from somewhere else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 06:35:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-interrupt-triggers-only-once/m-p/695543#M17505</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2017-08-19T06:35:48Z</dc:date>
    </item>
  </channel>
</rss>

