<?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: Use of GPIO Interruptions in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943768#M54491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Pablo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, we do not have such an application note explaining that. What I recommend you is to base your project in gpio_input_interrupt example from SDK and change the interrupt pin for PTB5. Please make sure of the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Initialize clock.&lt;/P&gt;&lt;P&gt;-Initialize corresponding pin.&lt;/P&gt;&lt;P&gt;-Configure interrupt.&lt;/P&gt;&lt;P&gt;-Initialize GPIO.&lt;/P&gt;&lt;P&gt;-Use the appropriate interrupt handler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this 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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Aug 2019 20:42:37 GMT</pubDate>
    <dc:creator>FelipeGarcia</dc:creator>
    <dc:date>2019-08-26T20:42:37Z</dc:date>
    <item>
      <title>Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943762#M54485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been trying to setup interruptions on PTB5 (Pin 12) of MKE16Z64VLD but it is not working. I am following the example called gpio_input_interrupt present on the SDK but still I cannot get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;void PORTBCD_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;/*GPIOB5 PORTB PIN 12*/&lt;BR /&gt; GPIO_PortClearInterruptFlags(GPIOB, 1U &amp;lt;&amp;lt; 5U);&lt;BR /&gt;INT= 1;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping&lt;BR /&gt; exception return operation might vector to incorrect interrupt */&lt;BR /&gt; #if defined __CORTEX_M &amp;amp;&amp;amp; (__CORTEX_M == 4U)&lt;BR /&gt; __DSB();&lt;BR /&gt; #endif&lt;BR /&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;int main(void) {&lt;BR /&gt; /* Init board hardware. */&lt;BR /&gt; BOARD_InitBootPins();&lt;BR /&gt; BOARD_InitBootClocks();&lt;BR /&gt; BOARD_InitBootPeripherals();&lt;BR /&gt; /* Init FSL debug console. */&lt;BR /&gt; BOARD_InitDebugConsole();&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;/* Define the init structure for the input pin */&lt;BR /&gt; gpio_pin_config_t sw_config = {&lt;BR /&gt; kGPIO_DigitalInput, 0,&lt;BR /&gt; };&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;#if (defined(FSL_FEATURE_PORT_HAS_NO_INTERRUPT) &amp;amp;&amp;amp; FSL_FEATURE_PORT_HAS_NO_INTERRUPT)&lt;BR /&gt; GPIO_SetPinInterruptConfig(GPIOB, 5U, kGPIO_InterruptFallingEdge);&lt;BR /&gt;#else&lt;BR /&gt; PORT_SetPinInterruptConfig(PORTB, 5U, kPORT_InterruptFallingEdge);&lt;BR /&gt;#endif&lt;BR /&gt; EnableIRQ(&lt;SPAN&gt;PORTBCD_IRQHandler&lt;/SPAN&gt;);&lt;BR /&gt; GPIO_PinInit(GPIOB, 5U, &amp;amp;sw_config);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;while(1) {&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (INT)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{PRINTF (" Interruption");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;INT=0;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; return 0 ;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;As you can see the code I am using is almost the same one as the example. I am kind of clueless of why it may be failing, so&amp;nbsp;any kind of help will be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pablo Cosgaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2019 10:56:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943762#M54485</guid>
      <dc:creator>pablo_cosgaya</dc:creator>
      <dc:date>2019-08-20T10:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943763#M54486</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;Are you sure that you have enabled interrupts globally?&lt;/P&gt;&lt;P&gt;General guide to GPIO interrupts: &lt;A href="https://www.youtube.com/watch?v=CubinvMuTwU&amp;amp;list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&amp;amp;index=18" target="test_blank"&gt;https://www.youtube.com/watch?v=CubinvMuTwU&amp;amp;list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&amp;amp;index=18&lt;/A&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;Mark&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;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Complete Kinetis solutions for professional needs, training and support: &lt;A href="http://www.utasker.com/kinetis.html" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Kinetis KE:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-KE02Z.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KE02Z.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-KE02Z40M.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KE02Z40M.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-KE04Z.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KE04Z.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-KE06Z.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KE06Z.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-KE15Z.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KE15Z.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;uTasker: supporting &amp;gt;1'000 registered Kinetis users get products faster and cheaper to market&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;Request Free emergency remote desk-top consulting at &lt;A href="http://www.utasker.com/services.html" target="test_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Open Source version at &lt;A href="https://github.com/uTasker/uTasker-Kinetis" target="test_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2019 23:22:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943763#M54486</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-08-20T23:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943764#M54487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not completely sure of what you mean, I've tried NVIC_GetEnableIRQ(PORTBCD_IRQn)) and it tells me interrupts are active, so it should be working but nevertheless the code never enters the interruption function. I have also tried enabling the interrupts on the main function just in case something was overwriting it but there was no&amp;nbsp;response with that method either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GPIO port and pins are initialized using the&amp;nbsp;BOARD_InitBootPins(); and&amp;nbsp;BOARD_InitBootPeripherals(); functions which seem to be working properly, I have checked inside of those the details of the initialization of the GPIO port and they seem to be correct and the port has the clock gate enabled as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really know what could be the problem, I will attach both the .mex I am using as well as the code just in case I am missing something obvious, which could honestly just be the case as I am quite new to microcontroller programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pablo&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2019 09:49:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943764#M54487</guid>
      <dc:creator>pablo_cosgaya</dc:creator>
      <dc:date>2019-08-21T09:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943765#M54488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Pablo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked your code and it seems that you are not enabling the pin mux functionality on &lt;STRONG&gt;pin_mux.c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should set is as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PORT_SetPinMux(PORTB, 5U, kPORT_MuxAsGpio);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this 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>Wed, 21 Aug 2019 17:42:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943765#M54488</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2019-08-21T17:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943766#M54489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check that the Cortex core's global interrupt mask (PRIMASK) is not set. You will find an instruction like&lt;/P&gt;&lt;P&gt;asm("cpsie&amp;nbsp;&amp;nbsp; i")&lt;/P&gt;&lt;P&gt;which clears it from its masked state after reset.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2019 19:17:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943766#M54489</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-08-21T19:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943767#M54490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added&amp;nbsp; this function and it doesn't seem to be working either, the code neer enters the interruption is still not working yet. I have also tried using&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;asm("cpsie&amp;nbsp;&amp;nbsp; i") and there has been no luck either. I have also tried using the&amp;nbsp;DisableGlobalIRQ and&amp;nbsp;EnableGlobalIRQ functions as well to check if gloal interrupts were off but that method has also failed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Is there any kind of setup guide or aplication note that goes step by step that I can check?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Pablo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 07:04:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943767#M54490</guid>
      <dc:creator>pablo_cosgaya</dc:creator>
      <dc:date>2019-08-22T07:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943768#M54491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Pablo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, we do not have such an application note explaining that. What I recommend you is to base your project in gpio_input_interrupt example from SDK and change the interrupt pin for PTB5. Please make sure of the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Initialize clock.&lt;/P&gt;&lt;P&gt;-Initialize corresponding pin.&lt;/P&gt;&lt;P&gt;-Configure interrupt.&lt;/P&gt;&lt;P&gt;-Initialize GPIO.&lt;/P&gt;&lt;P&gt;-Use the appropriate interrupt handler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this 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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2019 20:42:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943768#M54491</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2019-08-26T20:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use of GPIO Interruptions</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943769#M54492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally found the problem, turns out it was a HW problem instead of a SW one. I had pin 30 connected pulled down via a resistor on my PCB which caused the interruptions to never happen as it was the NMI pin which according to the reference manual should not have a LOW logic level if you need to use Interrupts. Thanks everyone for the help!&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;Pablo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 06:33:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-of-GPIO-Interruptions/m-p/943769#M54492</guid>
      <dc:creator>pablo_cosgaya</dc:creator>
      <dc:date>2019-08-29T06:33:18Z</dc:date>
    </item>
  </channel>
</rss>

