<?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 does not enter the Interrupt Serivce Routine (ISR) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431795#M65741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was testing the GPIO Interrupt using the supported SDK for iMX6q and faced a problem that the GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR).&lt;/P&gt;&lt;P&gt;I tried different GPIO banks and pins which made me trying different IRQs like IMX_INT_GPIO1_INT3 and IMX_INT_GPIO1_INT15_0 for GPIO1. I even tired Interrupts on the Low level and on the Negative edge.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What happens is that the interrupt status changes from 0 to 1 when the interrupt occurs but It never enters the ISR.&lt;/P&gt;&lt;P&gt;I removed the commands for registering the IRQ and enabling the Interrupt and the same thing happened.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested the interrupt in the PWM driver to see if there is a general problem in the interrupt but it worked well which I was sure by putting a printf in its ISR.&lt;/P&gt;&lt;P&gt;I attached the code If anyone can help to debug.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336266"&gt;gpio_int_test.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Sep 2015 19:57:52 GMT</pubDate>
    <dc:creator>abdelrahmanzaye</dc:creator>
    <dc:date>2015-09-07T19:57:52Z</dc:date>
    <item>
      <title>GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431795#M65741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was testing the GPIO Interrupt using the supported SDK for iMX6q and faced a problem that the GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR).&lt;/P&gt;&lt;P&gt;I tried different GPIO banks and pins which made me trying different IRQs like IMX_INT_GPIO1_INT3 and IMX_INT_GPIO1_INT15_0 for GPIO1. I even tired Interrupts on the Low level and on the Negative edge.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What happens is that the interrupt status changes from 0 to 1 when the interrupt occurs but It never enters the ISR.&lt;/P&gt;&lt;P&gt;I removed the commands for registering the IRQ and enabling the Interrupt and the same thing happened.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested the interrupt in the PWM driver to see if there is a general problem in the interrupt but it worked well which I was sure by putting a printf in its ISR.&lt;/P&gt;&lt;P&gt;I attached the code If anyone can help to debug.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336266"&gt;gpio_int_test.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 19:57:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431795#M65741</guid>
      <dc:creator>abdelrahmanzaye</dc:creator>
      <dc:date>2015-09-07T19:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431796#M65742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdelrahman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please look at attached example based on SDK, it uses&lt;/P&gt;&lt;P&gt;Vol-Up,Dn buttons on i.MX6Q SDP board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 02:32:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431796#M65742</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2015-09-08T02:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431797#M65743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/igorpadykov"&gt;igorpadykov&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply and the attachment.&lt;/P&gt;&lt;P&gt;I already saw that example and made my testing code based on it, but the&lt;/P&gt;&lt;P&gt;same problem occurs.&lt;/P&gt;&lt;P&gt;What I noticed is that function in the example, setup_interrupts_in_RAM();&lt;/P&gt;&lt;P&gt;which is not defined in the interrupt.c in the supported SDK v1.1,&lt;/P&gt;&lt;P&gt;So I think vectors.S may take its place in the SDK.&lt;/P&gt;&lt;P&gt;I already tried to add this function in interrupt.c in the SDK, then called&lt;/P&gt;&lt;P&gt;it in the test but the same problem occurs.&lt;/P&gt;&lt;P&gt;Do you know if anything can help in this case ?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abdelrahman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 08:40:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431797#M65743</guid>
      <dc:creator>abdelrahmanzaye</dc:creator>
      <dc:date>2015-09-08T08:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431798#M65744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdelrahman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can debug it, using good test and not good, executing&lt;/P&gt;&lt;P&gt;both step by step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 12:18:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431798#M65744</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2015-09-08T12:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431799#M65745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have seen this discussion,&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/thread/319294" target="test_blank"&gt;https://community.freescale.com/thread/319294&lt;/A&gt;&lt;/P&gt;&lt;P&gt;what's your opinion about this answer ? :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For default, the platform SDK code doesn't support interrupt, when&lt;/P&gt;&lt;P&gt;interrupt happens, it will goto dead loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To support interrupt, you need modify the file "src\init\vectors.S", add&lt;/P&gt;&lt;P&gt;the interrupt serveice function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original code is as followed, it means when interrupt happens, it will&lt;/P&gt;&lt;P&gt;just do dead loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IRQ_Handler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        B       IRQ_Handler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can change it to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IRQ_Handler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        bl       Do_Irq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can inplement the Do_Irq() fucntion in your C code to handle your&lt;/P&gt;&lt;P&gt;interrupts.&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;The problem is that I didn't find this line in "vectors.S"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IRQ_Handler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        B       IRQ_Handler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also I didn't understand how to implement the Do_Irq() fucntion in my C&lt;/P&gt;&lt;P&gt;code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abdelrahman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Tue, Sep 8, 2015 at 2:18 PM, igorpadykov &amp;lt;admin@community.freescale.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 14:40:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431799#M65745</guid>
      <dc:creator>abdelrahmanzaye</dc:creator>
      <dc:date>2015-09-08T14:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431800#M65746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdelrahman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my copy web SDK rev.2 I found:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file : vectors.S&lt;/P&gt;&lt;P&gt;.Lirq_addr:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .word&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRQ_HDLR &lt;/P&gt;&lt;P&gt;file interrupt.c:&lt;/P&gt;&lt;P&gt;void IRQ_HDLR(void) {...}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One can look at iMX6_Firmware_Guide.pdf in doc folder&lt;/P&gt;&lt;P&gt;sect.4.4.12 GIC test code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 15:47:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431800#M65746</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2015-09-08T15:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO Interrupt does not enter the Interrupt Serivce Routine (ISR)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431801#M65747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/igorpadykov"&gt;igorpadykov&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found where the error was, there is a bug in the SDK concerning the "&lt;SPAN style="font-size: 11.0pt; font-family: Consolas;"&gt;gpio_set_interrupt_mask()" function in the source file "gpio.c" in the directory "&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;…\iMX6_Platform_SDK\sdk\drivers\gpio\src&lt;/SPAN&gt;".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 11.0pt; font-family: Consolas;"&gt;the bugged function is as follows:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------------------&lt;/P&gt;&lt;P&gt;int32_t gpio_set_interrupt_mask(int32_t port, int32_t pin, int32_t mask)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((port &amp;gt; HW_GPIO_INSTANCE_COUNT) || (port &amp;lt; 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug_printf("Invalid GPIO Instance GPIO_PORT%d parameter. GPIO_PORT1~GPIO_PORT%d is allowed.\n",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; port, HW_GPIO_INSTANCE_COUNT);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return INVALID_PARAMETER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((pin &amp;gt; 31) || (pin &amp;lt; 0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug_printf("Invalid GPIO Pin %d parameter. Pin 0~31 is allowed.\n", pin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return INVALID_PARAMETER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t value = HW_GPIO_IMR_RD(port);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mask == GPIO_IMR_MASKED)&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; (2) also the if conditions are swapped&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value &amp;amp;= ~(1 &amp;lt;&amp;lt; pin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value |= 1 &amp;lt;&amp;lt; pin;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_GPIO_GDIR_WR(port, value);&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; (1) Here is the main bug; it writes to the register GDIR instead of IMR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0; //SUCCESS;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And the corrected function should be as follows:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-------------------------------------------------------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;int32_t gpio_set_interrupt_mask(int32_t port, int32_t pin, int32_t mask)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((port &amp;gt; HW_GPIO_INSTANCE_COUNT) || (port &amp;lt; 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug_printf("Invalid GPIO Instance GPIO_PORT%d parameter. GPIO_PORT1~GPIO_PORT%d is allowed.\n",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; port, HW_GPIO_INSTANCE_COUNT);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return INVALID_PARAMETER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((pin &amp;gt; 31) || (pin &amp;lt; 0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug_printf("Invalid GPIO Pin %d parameter. Pin 0~31 is allowed.\n", pin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return INVALID_PARAMETER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t value = HW_GPIO_IMR_RD(port);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5; color: #e23d39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mask == GPIO_IMR_MASKED)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value |= 1 &amp;lt;&amp;lt; pin;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value &amp;amp;= ~(1 &amp;lt;&amp;lt; pin);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;HW_GPIO_IMR_WR(port, value);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0; //SUCCESS;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abdelrahman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Nov 2015 23:53:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-Interrupt-does-not-enter-the-Interrupt-Serivce-Routine-ISR/m-p/431801#M65747</guid>
      <dc:creator>abdelrahmanzaye</dc:creator>
      <dc:date>2015-11-08T23:53:59Z</dc:date>
    </item>
  </channel>
</rss>

