<?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: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887606#M52506</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 did initially think that NMI wouldn't allow wake up from a low leakage mode since it is not in the list of low leakage wake-up sources:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/73492i8CBB36DFE5A3B372/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I tried it it did work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I noticed a note:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/73526i0BE8390E7CA6D1BC/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;where it is indeed specified.&lt;/P&gt;&lt;P&gt;I don't know whether this is what you based your decision on but it is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a FRDM-KL26Z binary to show it working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. On the Open SDA UART VCOM at 115200 Baud there is a menu.&lt;BR /&gt;Enter the menu item 4 (Administrator)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. List the low power modes supported by the chip with "show_lp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RUN = 0&lt;BR /&gt;WAIT = 1 [active]&lt;BR /&gt;STOP = 2&lt;BR /&gt;VLPR = 3&lt;BR /&gt;VLPS = 4&lt;BR /&gt;LLS = 5&lt;BR /&gt;VLLS0 = 6&lt;BR /&gt;VLLS1 = 7&lt;BR /&gt;VLLS3 = 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Select whatever low power mode you want to check to set the system to it - eg. "set_lp 5" to put it to LLS&lt;BR /&gt;&lt;EM&gt;I this state the current consumption can be verified.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Press the SW1 button to wake up from the mode using LLWU port input method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Repeat and apply a short '0' to the NMI pin to verify that it behaves the same.&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;EM&gt;Complete KL26 solutions, training and support:http://www.utasker.com/kinetis.html&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Kinetis KL26:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="http://www.utasker.com/kinetis/FRDM-KL26Z.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KL26Z.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;A href="http://www.utasker.com/kinetis/TEENSY_LC.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TEENSY_LC.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Apr 2019 17:33:03 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2019-04-14T17:33:03Z</dc:date>
    <item>
      <title>Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887598#M52498</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;Could NMI/PTA4 pin be both NMI and&amp;nbsp;GPIO with interrupt?&amp;nbsp; I have tried enabling NMI, which generate &lt;/P&gt;&lt;P&gt;Cpu_OnNMIINT function that I could use to tell NMI is interrupt.&amp;nbsp;&amp;nbsp; For the GPIO, I used BitIO with ExtInt_LDD.&amp;nbsp; When I ran the code, it seem the GPIO interrupt is not triggering.&amp;nbsp; Anyone have any guideline or example to get&amp;nbsp;these working?&amp;nbsp; Currently, I used processor expert to set things up.&amp;nbsp; Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2019 19:41:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887598#M52498</guid>
      <dc:creator>sheng_deng</dc:creator>
      <dc:date>2019-04-08T19:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887599#M52499</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;You can switch between NMI and GPIO interrupt (or DMA) modes on PTA4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the uTasker project I can do it like this by calling fnConfigIRQ()&amp;nbsp; [see reference code below] to use it as GPIO interrupt and then call fnConfigureNMI() to switch it to NMI interrupt handling, followed by fnConfigIRQ(), etc. etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;test_irq_PTA4&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;
    &lt;SPAN class="comment token"&gt;// toggle LED&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;extern&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;fnConfigureIRQ&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;
    INTERRUPT_SETUP interrupt_setup&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                     &lt;SPAN class="comment token"&gt;// interrupt configuration parameters&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_type       &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PORT_INTERRUPT&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                     &lt;SPAN class="comment token"&gt;// identifier to configure port interrupt&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_handler    &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; test_irq_PTA4&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                      &lt;SPAN class="comment token"&gt;// handling function&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_priority   &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PRIORITY_PORT_A_INT&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                &lt;SPAN class="comment token"&gt;// interrupt priority level&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_port       &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PORTA&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                              &lt;SPAN class="comment token"&gt;// the port that the interrupt input is on&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_port_sense &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;IRQ_FALLING_EDGE &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; PULLUP_ON&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;     &lt;SPAN class="comment token"&gt;// interrupt is to be falling edge sensitive&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;fnConfigureInterrupt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&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="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;interrupt_setup&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                      &lt;SPAN class="comment token"&gt;// configure interrupt&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;test_nmi_PTA4&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;
    &lt;SPAN class="comment token"&gt;// toggle LED&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;extern&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;fnConfigureNMI&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;
    &lt;SPAN class="token function"&gt;fnEnterNMI&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;test_nmi_PTA4&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                           &lt;SPAN class="comment token"&gt;// enter NMI handler and configure the pin as NMI&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;/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 don't know any details about whether PE generated code can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Beware when the NMI pin is not disabled in that a '0' on the input at reset causes the NMI vector (at address 0x00000008) to be immediately taken and so there needs to be a handler that clears the interrupt and allows the processor to continue. This handling is automated in the uTasker project&amp;nbsp; so that such issues are not experienced.&lt;/EM&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;EM&gt;Complete KL26 solutions, training and support:&lt;A href="http://www.utasker.com/kinetis.html" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Kinetis KL26:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="http://www.utasker.com/kinetis/FRDM-KL26Z.html" rel="nofollow noopener noreferrer" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KL26Z.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="http://www.utasker.com/kinetis/TEENSY_LC.html" rel="nofollow noopener noreferrer" target="test_blank"&gt;http://www.utasker.com/kinetis/TEENSY_LC.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2019 23:48:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887599#M52499</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-04-08T23:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887600#M52500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sheng Deng,&lt;/P&gt;&lt;P&gt;This pin is default as NMI_b function.&lt;BR /&gt;PORTA_PCR4[MUX] can be used to switch the PTA4 pin from NMI_b function to GPIO function. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78414iC345F7227BBBFBA6/image-size/large?v=v2&amp;amp;px=999" title="PTA4 ALT1 NMI_b ALT7.png" alt="PTA4 ALT1 NMI_b ALT7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78456iC250DF6557F582BE/image-size/large?v=v2&amp;amp;px=999" title="PORTA_PCR4[MUX].png" alt="PORTA_PCR4[MUX].png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to NMI interrupt is enabled by default. You may need to disable the NMI interrupt by clear FTFA_FOPT[NMI_DIS]. (Notice: The new settings will take effect on subsequent POR, VLLSx recoveries, and any system reset.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/78457i4A6D34B54F672868/image-size/large?v=v2&amp;amp;px=999" title="6.3.2 FOPT boot options.png" alt="6.3.2 FOPT boot options.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am confused why you want to use both NMI interrupts and GPIO interrupts at this pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 02:22:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887600#M52500</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2019-04-10T02:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887601#M52501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above you describe changing the NMI_B&amp;nbsp;to GPIO function, what about adding an interrupt to the GPIO function once its switch over?&amp;nbsp; Is it possible to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only reason I am using the NMI as NMI interrupts and GPIO interrupt is a legacy design.&amp;nbsp; Is it recommended to&amp;nbsp;use one of the LLWU pin to do what I want better then NMI if the choice is available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sheng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 14:31:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887601#M52501</guid>
      <dc:creator>sheng_deng</dc:creator>
      <dc:date>2019-04-10T14:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887602#M52502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sheng,&lt;/P&gt;&lt;P&gt;Can you tell us what functions NMI and GPIO interrupts want to achieve under each situation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Want to use the NMI function wake up MCU from&amp;nbsp; low power modes?&lt;BR /&gt;Use GPIO interrupt function as external event trigger source?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;Must use the same pin?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2019 08:02:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887602#M52502</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2019-04-12T08:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887603#M52503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the current&amp;nbsp;board layout,&amp;nbsp; NMI pin is use&amp;nbsp;as the&amp;nbsp;below&amp;nbsp;function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Want to use the NMI function wake up MCU from&amp;nbsp; low power modes?&lt;/P&gt;&lt;P&gt;-Yes&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Use GPIO interrupt function as external event trigger source?&lt;/P&gt;&lt;P&gt;-Yes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Must use the same pin?&lt;/P&gt;&lt;P&gt;-Yes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a more detail description.&lt;/P&gt;&lt;P&gt;Once the system enter low power modes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;When the daughter board want to transfer data, it will pulse the NMI from high to Low to wake up the system from sleep.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the system is not in low power mode:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;When MCU want to transfer data to the daughter board, NMI will act like&amp;nbsp;a&amp;nbsp;GPIO&amp;nbsp;OUTPUT and pulse high to low then change back to GPIO&amp;nbsp;INPUT with Interrupt as external event trigger to wait for when the daughter board want to transfer data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sheng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:07:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887603#M52503</guid>
      <dc:creator>sheng_deng</dc:creator>
      <dc:date>2019-04-12T12:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887604#M52504</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;Which low power mode is low power mode?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can NMI wake you from the one you want to use?&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>Fri, 12 Apr 2019 16:46:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887604#M52504</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-04-12T16:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887605#M52505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Which low power mode is low power mode?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;-low leakage stop&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Can NMI wake you from the one you want to use?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;- From the spec, it should be able to wake up form low leakage stop mode.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Do you know any example that does what I want to do with the nmi?&amp;nbsp; Or is it better to use another pin, such as llwu pin?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Thanks,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Sheng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Apr 2019 00:58:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887605#M52505</guid>
      <dc:creator>sheng_deng</dc:creator>
      <dc:date>2019-04-13T00:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887606#M52506</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 did initially think that NMI wouldn't allow wake up from a low leakage mode since it is not in the list of low leakage wake-up sources:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/73492i8CBB36DFE5A3B372/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I tried it it did work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I noticed a note:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/73526i0BE8390E7CA6D1BC/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;where it is indeed specified.&lt;/P&gt;&lt;P&gt;I don't know whether this is what you based your decision on but it is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a FRDM-KL26Z binary to show it working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. On the Open SDA UART VCOM at 115200 Baud there is a menu.&lt;BR /&gt;Enter the menu item 4 (Administrator)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. List the low power modes supported by the chip with "show_lp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RUN = 0&lt;BR /&gt;WAIT = 1 [active]&lt;BR /&gt;STOP = 2&lt;BR /&gt;VLPR = 3&lt;BR /&gt;VLPS = 4&lt;BR /&gt;LLS = 5&lt;BR /&gt;VLLS0 = 6&lt;BR /&gt;VLLS1 = 7&lt;BR /&gt;VLLS3 = 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Select whatever low power mode you want to check to set the system to it - eg. "set_lp 5" to put it to LLS&lt;BR /&gt;&lt;EM&gt;I this state the current consumption can be verified.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Press the SW1 button to wake up from the mode using LLWU port input method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Repeat and apply a short '0' to the NMI pin to verify that it behaves the same.&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;EM&gt;Complete KL26 solutions, training and support:http://www.utasker.com/kinetis.html&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Kinetis KL26:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="http://www.utasker.com/kinetis/FRDM-KL26Z.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-KL26Z.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;A href="http://www.utasker.com/kinetis/TEENSY_LC.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TEENSY_LC.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Apr 2019 17:33:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887606#M52506</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-04-14T17:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Could NMI/PTA4 pin for MKL16Z128VFM4 function both NMI and Input/output with interrupt?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887607#M52507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for verifying its possible to use NMI in the way I describe.&amp;nbsp; Unfortunately, I do not have&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;FRDM-KL26Z.&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;From your previous reply, I think you did not use PE to accomplish this.&amp;nbsp; Could you be able to share your code or thoughts on how you make this work?&amp;nbsp; &amp;nbsp;I been trying to get this work with PE only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sheng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2019 15:24:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Could-NMI-PTA4-pin-for-MKL16Z128VFM4-function-both-NMI-and-Input/m-p/887607#M52507</guid>
      <dc:creator>sheng_deng</dc:creator>
      <dc:date>2019-04-15T15:24:39Z</dc:date>
    </item>
  </channel>
</rss>

