<?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のトピックI.MX8 SCU scfw link GPIO interrupt to Interrupt handler</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/I-MX8-SCU-scfw-link-GPIO-interrupt-to-Interrupt-handler/m-p/1544058#M196868</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am experimenting with an IMX8QM MEK board in order to finally make our own board.&lt;/P&gt;&lt;P&gt;For that own board we would ultimately like to use GPIO0 pin 5 as an interrupt pin to trigger various actions. Using the scfw porting guide I have created the following two snippets of code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This section of code should initialize the pin and set it up to generate the interrupts:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_config.direction = kGPIO_DigitalInput;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_config.outputLogic=0; /*!&amp;lt; Set a default output logic, which has no use in input */&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_config.interruptMode=kGPIO_IntLowLevel;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_PinInit((GPIO_Type *)GPIO0_BASE, 5U, &amp;amp;GPIO_config);&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_EnableInterrupts((GPIO_Type *)GPIO0_BASE, PIN5_MASK);&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is the initial IRQHandler I would like to test&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void GPIO0_PIN5_IRQHandler (void)&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_ClearPinsInterruptFlags((GPIO_Type *)GPIO0_BASE, PIN5_MASK);&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Both snippets of code reside in the experimental&lt;STRONG&gt; board.c &lt;/STRONG&gt;file and build without problems so I assume they are OK.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What I am unable to find is how to link the target IRQHandler to the actual interrupt. There are a few other IRQHandlers in the&amp;nbsp;&lt;STRONG&gt;board.c&lt;/STRONG&gt;&amp;nbsp;code but neither the source code nor the &lt;STRONG&gt;scfw_port.pdf&lt;/STRONG&gt;&amp;nbsp;file provide any info as to how those IRQHandlers were linked to their respective interrupt sources.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does anyone have some more info on this or a link to where I could find the necessary information?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any help on this would be very much appreciated.&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 26 Oct 2022 12:48:23 GMT</pubDate>
    <dc:creator>fd9750</dc:creator>
    <dc:date>2022-10-26T12:48:23Z</dc:date>
    <item>
      <title>I.MX8 SCU scfw link GPIO interrupt to Interrupt handler</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I-MX8-SCU-scfw-link-GPIO-interrupt-to-Interrupt-handler/m-p/1544058#M196868</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am experimenting with an IMX8QM MEK board in order to finally make our own board.&lt;/P&gt;&lt;P&gt;For that own board we would ultimately like to use GPIO0 pin 5 as an interrupt pin to trigger various actions. Using the scfw porting guide I have created the following two snippets of code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This section of code should initialize the pin and set it up to generate the interrupts:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_config.direction = kGPIO_DigitalInput;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_config.outputLogic=0; /*!&amp;lt; Set a default output logic, which has no use in input */&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_config.interruptMode=kGPIO_IntLowLevel;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_PinInit((GPIO_Type *)GPIO0_BASE, 5U, &amp;amp;GPIO_config);&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_EnableInterrupts((GPIO_Type *)GPIO0_BASE, PIN5_MASK);&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is the initial IRQHandler I would like to test&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void GPIO0_PIN5_IRQHandler (void)&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GPIO_ClearPinsInterruptFlags((GPIO_Type *)GPIO0_BASE, PIN5_MASK);&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Both snippets of code reside in the experimental&lt;STRONG&gt; board.c &lt;/STRONG&gt;file and build without problems so I assume they are OK.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What I am unable to find is how to link the target IRQHandler to the actual interrupt. There are a few other IRQHandlers in the&amp;nbsp;&lt;STRONG&gt;board.c&lt;/STRONG&gt;&amp;nbsp;code but neither the source code nor the &lt;STRONG&gt;scfw_port.pdf&lt;/STRONG&gt;&amp;nbsp;file provide any info as to how those IRQHandlers were linked to their respective interrupt sources.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does anyone have some more info on this or a link to where I could find the necessary information?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any help on this would be very much appreciated.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Oct 2022 12:48:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I-MX8-SCU-scfw-link-GPIO-interrupt-to-Interrupt-handler/m-p/1544058#M196868</guid>
      <dc:creator>fd9750</dc:creator>
      <dc:date>2022-10-26T12:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX8 SCU scfw link GPIO interrupt to Interrupt handler</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I-MX8-SCU-scfw-link-GPIO-interrupt-to-Interrupt-handler/m-p/1546624#M197044</link>
      <description>&lt;P&gt;You can find other handler in&amp;nbsp;startup_MX8QM.o, this file is compiled from&amp;nbsp;startup_MX8QM.S which we don't release it to customer. This means you can't add your handler.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qmiller_0-1667280525753.png" style="width: 598px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/198695iC3557186C82B8A55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Qmiller_0-1667280525753.png" alt="Qmiller_0-1667280525753.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Qmiller_0-1667280525753.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 05:31:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I-MX8-SCU-scfw-link-GPIO-interrupt-to-Interrupt-handler/m-p/1546624#M197044</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2022-11-01T05:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX8 SCU scfw link GPIO interrupt to Interrupt handler</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I-MX8-SCU-scfw-link-GPIO-interrupt-to-Interrupt-handler/m-p/1547505#M197101</link>
      <description>&lt;P&gt;Hi Qmiller,&lt;/P&gt;&lt;P&gt;I very much thought that what you describe is exactly what the existing &lt;STRONG&gt;scfw&lt;/STRONG&gt; code does, I did not know exactly in which file it was done but now I do.&lt;/P&gt;&lt;P&gt;In the mean time I have doing some further digging and I think I have found a possible solution but I am missing an essential bit of information. When the provided functions to set up the GPIO interrupt ( as documented in the &lt;STRONG&gt;scfw_port.pdf&lt;/STRONG&gt; document ) are used they must ultimately link the &lt;STRONG&gt;GPIO&lt;/STRONG&gt; interrupt to one of the &lt;STRONG&gt;INTMUX_n&lt;/STRONG&gt; or &lt;STRONG&gt;IOMIX_n&lt;/STRONG&gt; units which in their turn link to an &lt;STRONG&gt;NVIC_number&lt;/STRONG&gt;. Which GPIO links to which MUX unit is unfortunately not documented.&lt;/P&gt;&lt;P&gt;If we can find which &lt;STRONG&gt;MUX&lt;/STRONG&gt; unit &lt;STRONG&gt;GPIO5&lt;/STRONG&gt; is linked to it should be possible to assign a vector to the &lt;STRONG&gt;NVIC&lt;/STRONG&gt; table using the&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;NVIC_SetVector&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;127&lt;/SPAN&gt;&lt;SPAN&gt;, (&lt;/SPAN&gt;&lt;SPAN&gt;uint32_t&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;)GPIO0_PIN5_IRQHandler) &lt;/STRONG&gt;function to define the IRQ handler's address. The number &lt;STRONG&gt;127&lt;/STRONG&gt; I have picked is just an "educated guess" number I used to check whether or not the &lt;STRONG&gt;NVIC_SetVector&lt;/STRONG&gt;&amp;nbsp;function actually compiles and builds, which it does.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If we could get any additional info on the GPIO/MUX linking I think we can make it work or at least do some testing/debugging.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 07:27:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I-MX8-SCU-scfw-link-GPIO-interrupt-to-Interrupt-handler/m-p/1547505#M197101</guid>
      <dc:creator>fd9750</dc:creator>
      <dc:date>2022-11-02T07:27:02Z</dc:date>
    </item>
  </channel>
</rss>

