<?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 RT685 GPIO Interrupt Handler not executing in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-GPIO-Interrupt-Handler-not-executing/m-p/1715294#M26640</link>
    <description>&lt;P&gt;So, I am trying to build out functionality and understand how everything fits together and I am having some trouble with a simple problem.&amp;nbsp; I have put together a handler for systick that is functional, but when I try to add an interrupt for switch 2 on the rt685-aud-evk, the handler never executes when the switch is toggled.&amp;nbsp; I have the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;	if (EnableIRQ(SW_IRQ))
	{
		PRINTF("Failed to enable interrupt\r\n");
	}
	else
	{
		PRINTF("Interupt enabled\r\n");
	}

	GPIO_SetPinInterruptConfig(GPIO, SW_PORT, SW_PIN, &amp;amp;config);
	GPIO_PinEnableInterrupt(GPIO, SW_PORT, SW_PIN, kGPIO_InterruptA);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where SW_IRQ is GPIO_INTA_IRQn and the config is for a trigger on a rising or falling edge.&amp;nbsp; My interrupt handler looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void SW_GPIO_INTA_IRQHandler(void)
{
    GPIO_PinClearInterruptFlag(GPIO, SW_PORT, SW_PIN, 0);
    gpioIntSignal = true;
    SDK_ISR_EXIT_BARRIER;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where SW_GPIO_INTA_IRQHandler is defined as GPIO_INTA_IRQHandler.&amp;nbsp; I can see the switch toggling, but it seems that I am missing something with regards to actually using the handler.&amp;nbsp; Any thoughts?&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 17:54:06 GMT</pubDate>
    <dc:creator>mrichardson23</dc:creator>
    <dc:date>2023-08-31T17:54:06Z</dc:date>
    <item>
      <title>RT685 GPIO Interrupt Handler not executing</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-GPIO-Interrupt-Handler-not-executing/m-p/1715294#M26640</link>
      <description>&lt;P&gt;So, I am trying to build out functionality and understand how everything fits together and I am having some trouble with a simple problem.&amp;nbsp; I have put together a handler for systick that is functional, but when I try to add an interrupt for switch 2 on the rt685-aud-evk, the handler never executes when the switch is toggled.&amp;nbsp; I have the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;	if (EnableIRQ(SW_IRQ))
	{
		PRINTF("Failed to enable interrupt\r\n");
	}
	else
	{
		PRINTF("Interupt enabled\r\n");
	}

	GPIO_SetPinInterruptConfig(GPIO, SW_PORT, SW_PIN, &amp;amp;config);
	GPIO_PinEnableInterrupt(GPIO, SW_PORT, SW_PIN, kGPIO_InterruptA);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where SW_IRQ is GPIO_INTA_IRQn and the config is for a trigger on a rising or falling edge.&amp;nbsp; My interrupt handler looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void SW_GPIO_INTA_IRQHandler(void)
{
    GPIO_PinClearInterruptFlag(GPIO, SW_PORT, SW_PIN, 0);
    gpioIntSignal = true;
    SDK_ISR_EXIT_BARRIER;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where SW_GPIO_INTA_IRQHandler is defined as GPIO_INTA_IRQHandler.&amp;nbsp; I can see the switch toggling, but it seems that I am missing something with regards to actually using the handler.&amp;nbsp; Any thoughts?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 17:54:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-GPIO-Interrupt-Handler-not-executing/m-p/1715294#M26640</guid>
      <dc:creator>mrichardson23</dc:creator>
      <dc:date>2023-08-31T17:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: RT685 GPIO Interrupt Handler not executing</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-GPIO-Interrupt-Handler-not-executing/m-p/1716297#M26658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/221356"&gt;@mrichardson23&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;I think your main issue is related to the configuration, please refer to this SDK demo:&lt;/P&gt;
&lt;P&gt;SDK_2_14_0_EVK-MIMXRT685\boards\evkmimxrt685\driver_examples\gpio\input_interrupt&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It is also using&amp;nbsp;GPIO_INTA_IRQn,&amp;nbsp;GPIO_INTA_DriverIRQHandler.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Please refer to that code and try it.&lt;/P&gt;
&lt;P&gt;#define APP_GPIO_INTA_IRQHandler GPIO_INTA_DriverIRQHandler&lt;BR /&gt;#define APP_SW_IRQ GPIO_INTA_IRQn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You still need the GPIO configuration:&lt;/P&gt;
&lt;P&gt;GPIO_PortInit(GPIO, APP_SW_PORT);&lt;BR /&gt;GPIO_PinInit(GPIO, APP_SW_PORT, APP_SW_PIN, &amp;amp;sw_config);&lt;/P&gt;
&lt;P&gt;Anyway, refer to the SDK, based on the SDK do the pin modification.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you!&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 07:38:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-GPIO-Interrupt-Handler-not-executing/m-p/1716297#M26658</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2023-09-04T07:38:47Z</dc:date>
    </item>
  </channel>
</rss>

