<?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 Re: Input interrupt Handler example on KW41Z  in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881288#M52276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Felipe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much! That's the answer I was looking for, I will try it in my code and I report you my status.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you also take a look to other issue I posted related to the I2C slave communication inside router_eligible_device_freertos project?&amp;nbsp;&lt;A href="https://community.nxp.com/thread/493643"&gt;R41Z I2C compatibility with Raspberry Pi? &lt;/A&gt;&amp;nbsp;&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;Diego Comín&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2019 11:22:26 GMT</pubDate>
    <dc:creator>diegocomin</dc:creator>
    <dc:date>2019-02-07T11:22:26Z</dc:date>
    <item>
      <title>Input interrupt Handler example on KW41Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881285#M52273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using as a project base the "frdmkw41z_driver_examples_gpio_input_interrupt" SDK example. In this project the SW3 attached to the PTC4 pin is configured as an input interrupt and it uses the&amp;nbsp;PORTB_PORTC_IRQHandler to receive the interrupt and set a flag to toggle a LED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case I want to set up two input interrupts the SW3 and SW4 (PTC4 and PTC5), as there is only one IRQHandler&amp;nbsp;for the same PORTB (&lt;SPAN&gt;PORTB_PORTC_IRQHandler)&lt;/SPAN&gt; how can I receive the input interrupt from the SW4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I can see, there are only two IRQHandler:&amp;nbsp;PORTB_PORTC_IRQHandler and PORTA_IRQHandler, so this means that the Board can only handle two input interrupts at the same time? How can I receive more digital input interrupts?&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;Diego Comín&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2019 12:53:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881285#M52273</guid>
      <dc:creator>diegocomin</dc:creator>
      <dc:date>2019-02-04T12:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Input interrupt Handler example on KW41Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881286#M52274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diego&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see this video showing how you can do this: &lt;A href="https://www.youtube.com/watch?v=CubinvMuTwU" target="test_blank"&gt;https://www.youtube.com/watch?v=CubinvMuTwU&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is standard in the uTasker project where each pin can be given its own interrupt call back.&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;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Complete Kinetis solutions, training and support:http://www.utasker.com/kinetis.html&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2019 17:33:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881286#M52274</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-02-04T17:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Input interrupt Handler example on KW41Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881287#M52275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diego,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can receive as many interrupts as pins you have available, the thing is that the handler will be the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you have to do is call the function &lt;STRONG&gt;int32_t GPIO_GetPinsInterruptFlags(GPIO_Type *base)&lt;/STRONG&gt; inside the &lt;STRONG&gt;IRQHandler&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;This function will give you the current GPIO port interrupt status flag, for example, 0x00010001 means pin 0 and 17 have the interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, depending on the value &lt;STRONG&gt;PORTx_ISFR&lt;/STRONG&gt; you can set flags according to your needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please take the following &lt;STRONG&gt;IRQHandler&lt;/STRONG&gt; as an example:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;BOARD_SW_IRQ_HANDLER&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;

interruptflag &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;GPIO_GetPinsInterruptFlags&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;BOARD_SW_GPIO&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0x10&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; interruptflag&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// flag for SW3&lt;/SPAN&gt;

g_ButtonSW3Press &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0x20&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; interruptflag&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// flag for SW4&lt;/SPAN&gt;

g_ButtonSW4Press &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;/* Clear external interrupt flags. */&lt;/SPAN&gt;

&lt;SPAN class="token function"&gt;GPIO_ClearPinsInterruptFlags&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;BOARD_SW_GPIO&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1U&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; BOARD_SW3_GPIO_PIN&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token function"&gt;GPIO_ClearPinsInterruptFlags&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;BOARD_SW_GPIO&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1U&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; BOARD_SW4_GPIO_PIN&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

 ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 00:00:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881287#M52275</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2019-02-07T00:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Input interrupt Handler example on KW41Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881288#M52276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Felipe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much! That's the answer I was looking for, I will try it in my code and I report you my status.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you also take a look to other issue I posted related to the I2C slave communication inside router_eligible_device_freertos project?&amp;nbsp;&lt;A href="https://community.nxp.com/thread/493643"&gt;R41Z I2C compatibility with Raspberry Pi? &lt;/A&gt;&amp;nbsp;&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;Diego Comín&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 11:22:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Input-interrupt-Handler-example-on-KW41Z/m-p/881288#M52276</guid>
      <dc:creator>diegocomin</dc:creator>
      <dc:date>2019-02-07T11:22:26Z</dc:date>
    </item>
  </channel>
</rss>

