<?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>i.MX ProcessorsのトピックRe: IMX8MM cortex-m4 GPIO interrupt example</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1792355#M218950</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/228435"&gt;@Bruno_Eztronic&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing well.&lt;/P&gt;
&lt;P&gt;I know, in SDK is not an GPIO input interrupt example.&lt;/P&gt;
&lt;P&gt;I made a little program to use an interrupt in GPIO5_12 (I connected a push button) and I used the GPIO5_11 to toggle a LED in each interrupt.&lt;/P&gt;
&lt;P&gt;Keep in mind the interrupts in SDK has a "number of IRQ (GPIOn_Combined_0_15_IRQn or GPIOn_Combined_16_31_IRQn)" and for an IRQHandler.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alejandro_Salas_0-1705714945518.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259236i7F2AB3E454CE2BA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alejandro_Salas_0-1705714945518.png" alt="Alejandro_Salas_0-1705714945518.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There you can see the simple definition of GPIO5_IO12 pin and the GPIO5_Combined_0_15_IRQn and&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;GPIO5_Combined_0_15_IRQHandler, this handler is only a "pointer" to our IRQHandler function:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alejandro_Salas_1-1705715099007.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259237i22FC70A31A5CC5D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alejandro_Salas_1-1705715099007.png" alt="Alejandro_Salas_1-1705715099007.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you require more information about of IRQs you can see the Reference Manual Table 7-1 ARM Domain Interrupt Summary.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alejandro_Salas_2-1705715255753.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259238i40FA8DDA3C460FD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alejandro_Salas_2-1705715255753.png" alt="Alejandro_Salas_2-1705715255753.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That is the reason why we need&amp;nbsp;GPIO5_Combined_0_15_IRQn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any way, I will attach the gpio_led_output.c, there is the example of using interrupt in GPIO5_IO12 and toggle led in GPIO5_IO11.&lt;/P&gt;
&lt;P&gt;In serial terminal you will see:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CM4_IRQ.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259239i64802693590B9A14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CM4_IRQ.png" alt="CM4_IRQ.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;I hope this can helps to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Salas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jan 2024 01:53:44 GMT</pubDate>
    <dc:creator>Manuel_Salas</dc:creator>
    <dc:date>2024-01-20T01:53:44Z</dc:date>
    <item>
      <title>IMX8MM cortex-m4 GPIO interrupt example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1792202#M218943</link>
      <description>&lt;P&gt;Hello NXP,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;recently I was developing an application for imx8mm cortex-m4 and a GPIO interrupt was needed. I haven't found any examples available that show how to properly configure the GPIO interrupt.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you have&amp;nbsp;imx8MM M4 MCU GPIO input interrupt example code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bruno&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 18:03:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1792202#M218943</guid>
      <dc:creator>Bruno_Eztronic</dc:creator>
      <dc:date>2024-01-19T18:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MM cortex-m4 GPIO interrupt example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1792355#M218950</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/228435"&gt;@Bruno_Eztronic&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing well.&lt;/P&gt;
&lt;P&gt;I know, in SDK is not an GPIO input interrupt example.&lt;/P&gt;
&lt;P&gt;I made a little program to use an interrupt in GPIO5_12 (I connected a push button) and I used the GPIO5_11 to toggle a LED in each interrupt.&lt;/P&gt;
&lt;P&gt;Keep in mind the interrupts in SDK has a "number of IRQ (GPIOn_Combined_0_15_IRQn or GPIOn_Combined_16_31_IRQn)" and for an IRQHandler.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alejandro_Salas_0-1705714945518.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259236i7F2AB3E454CE2BA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alejandro_Salas_0-1705714945518.png" alt="Alejandro_Salas_0-1705714945518.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There you can see the simple definition of GPIO5_IO12 pin and the GPIO5_Combined_0_15_IRQn and&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;GPIO5_Combined_0_15_IRQHandler, this handler is only a "pointer" to our IRQHandler function:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alejandro_Salas_1-1705715099007.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259237i22FC70A31A5CC5D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alejandro_Salas_1-1705715099007.png" alt="Alejandro_Salas_1-1705715099007.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you require more information about of IRQs you can see the Reference Manual Table 7-1 ARM Domain Interrupt Summary.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alejandro_Salas_2-1705715255753.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259238i40FA8DDA3C460FD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alejandro_Salas_2-1705715255753.png" alt="Alejandro_Salas_2-1705715255753.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That is the reason why we need&amp;nbsp;GPIO5_Combined_0_15_IRQn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any way, I will attach the gpio_led_output.c, there is the example of using interrupt in GPIO5_IO12 and toggle led in GPIO5_IO11.&lt;/P&gt;
&lt;P&gt;In serial terminal you will see:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CM4_IRQ.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259239i64802693590B9A14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CM4_IRQ.png" alt="CM4_IRQ.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;I hope this can helps to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Salas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 01:53:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1792355#M218950</guid>
      <dc:creator>Manuel_Salas</dc:creator>
      <dc:date>2024-01-20T01:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MM cortex-m4 GPIO interrupt example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1793161#M219025</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203368"&gt;@Manuel_Salas&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes this helped me a lot. Your example worked perfectly. But it's important to mention that when you're working on a system that runs Linux on the main processor and you try use the GPIO interrupts on the M4 core you can face some issues and conflicts.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 17:40:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1793161#M219025</guid>
      <dc:creator>Bruno_Eztronic</dc:creator>
      <dc:date>2024-01-22T17:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MM cortex-m4 GPIO interrupt example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1793871#M219090</link>
      <description>&lt;P&gt;That gpio_led_output.c file which you have provided , how do I compile for M4 and where to place inside the SDK .&lt;BR /&gt;I have imx8m mini board , I have compiled the hello_world, ping_pong examples and tested in M4 .&amp;nbsp;&lt;BR /&gt;I am using linux enviornment in my pc to compile the code.&lt;BR /&gt;&lt;BR /&gt;Now I want to write my specific code for M4 and compile it , How can i do that ?&lt;BR /&gt;Is there any document available then please share it.&lt;BR /&gt;&lt;BR /&gt;As you have provided the gpio_led_output.c file and it works for you , please let me know how you have done it.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards&lt;BR /&gt;Deepak Kumar Beniya&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 14:20:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1793871#M219090</guid>
      <dc:creator>deepakbeniya</dc:creator>
      <dc:date>2024-01-23T14:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MM cortex-m4 GPIO interrupt example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1793979#M219098</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227532"&gt;@deepakbeniya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I hope you a re doing well.&lt;/P&gt;
&lt;P&gt;In this case, I cloned the &lt;SPAN&gt;gpio_led_output example that is in folder /driver_examples/gpio/gpio_led_output and then I modified the code there.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can start your own project&amp;nbsp;from a project template that is include in the SDK folder but you need to do several modifications.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cloning the example you will be able to compile in the same way that you compile an example but with your own code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this can helps to you to compile your own code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Salas.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 16:44:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MM-cortex-m4-GPIO-interrupt-example/m-p/1793979#M219098</guid>
      <dc:creator>Manuel_Salas</dc:creator>
      <dc:date>2024-01-23T16:44:26Z</dc:date>
    </item>
  </channel>
</rss>

