<?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>Kinetis MicrocontrollersのトピックRe: clearing interrupt status flag is not working</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023121#M56306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="251477" data-username="danielebruno" href="https://community.nxp.com/people/danielebruno"&gt;DANIELE BRUNO&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Yes, I know, you use the &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;DisableIRQ(BOARD_DATA_IN_IRQ) instruction &lt;/SPAN&gt;, but in your function, you enable it again:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void My_Function(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;DisableIRQ(BOARD_DATA_IN_IRQ);&lt;/P&gt;&lt;P&gt;/*******************************/&lt;/P&gt;&lt;P&gt;Instructions executed by the function.....&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*******************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GPIO_PortClearInterruptFlags(BOARD_DATA_IN_GPIO, 1U &amp;lt;&amp;lt; BOARD_DATA_IN_PIN);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EnableIRQ(BOARD_DATA_IN_IRQ);&lt;/STRONG&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;So, you can comment &lt;STRONG&gt;EnableIRQ(BOARD_DATA_IN_IRQ);&lt;/STRONG&gt; Then try it again, whether you still can enter the interrupt or not?&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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 style="min- padding: 0px;"&gt;&amp;nbsp;&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, 13 Nov 2019 01:50:44 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2019-11-13T01:50:44Z</dc:date>
    <item>
      <title>clearing interrupt status flag is not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023118#M56303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using the KL26 microcontroller in one of our boards.&lt;/P&gt;&lt;P&gt;I have a problem about&amp;nbsp;clearing pending flags / disabling / enabling interrupts.&lt;/P&gt;&lt;P&gt;I have configured one input on PORTC in order to generate an interrupt on its falling edge but there is a function that&amp;nbsp;must not be interrupted by the signal above-mentioned:&lt;/P&gt;&lt;P&gt;void My_Function(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;DisableIRQ(BOARD_DATA_IN_IRQ);&lt;/P&gt;&lt;P&gt;/*******************************/&lt;/P&gt;&lt;P&gt;Instructions executed by the function.....&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*******************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GPIO_PortClearInterruptFlags(BOARD_DATA_IN_GPIO, 1U &amp;lt;&amp;lt; BOARD_DATA_IN_PIN);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EnableIRQ(BOARD_DATA_IN_IRQ);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;The system doesn't work because as the pulse arrives, the function is interrupted.&lt;/P&gt;&lt;P&gt;There is something wrong in the sequence that I have written ?&lt;/P&gt;&lt;P&gt;Thank you for all the attention,&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Daniele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2019 08:17:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023118#M56303</guid>
      <dc:creator>danielebruno</dc:creator>
      <dc:date>2019-11-08T08:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: clearing interrupt status flag is not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023119#M56304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="251477" data-username="danielebruno" href="https://community.nxp.com/people/danielebruno"&gt;DANIELE BRUNO&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Do you want to disable the Port interrupt?&lt;/P&gt;&lt;P&gt;&amp;nbsp; If yes, you need to use DisableIRQ(BOARD_DATA_IN_IRQ);, not just clear the flag.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Clear flag, just disable the ongoing interrupt flag, not the next&amp;nbsp; port interrupt, that's why even you clear the flag, you still can enter the interrupt handler. So, you can try to use disableIRQ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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 style="min- padding: 0px;"&gt;&amp;nbsp;&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>Tue, 12 Nov 2019 03:10:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023119#M56304</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2019-11-12T03:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: clearing interrupt status flag is not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023120#M56305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;as you can see I use the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;DisableIRQ(BOARD_DATA_IN_IRQ) instruction when I enter in &lt;SPAN&gt;My_Function but it doesn't work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Perhaps I have to introduce some delay or control between&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;GPIO_PortClearInterruptFlags and EnableIRQ instructions ?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Have a great day,&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Daniele&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2019 08:16:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023120#M56305</guid>
      <dc:creator>danielebruno</dc:creator>
      <dc:date>2019-11-12T08:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: clearing interrupt status flag is not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023121#M56306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="251477" data-username="danielebruno" href="https://community.nxp.com/people/danielebruno"&gt;DANIELE BRUNO&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Yes, I know, you use the &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;DisableIRQ(BOARD_DATA_IN_IRQ) instruction &lt;/SPAN&gt;, but in your function, you enable it again:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void My_Function(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;DisableIRQ(BOARD_DATA_IN_IRQ);&lt;/P&gt;&lt;P&gt;/*******************************/&lt;/P&gt;&lt;P&gt;Instructions executed by the function.....&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*******************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GPIO_PortClearInterruptFlags(BOARD_DATA_IN_GPIO, 1U &amp;lt;&amp;lt; BOARD_DATA_IN_PIN);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EnableIRQ(BOARD_DATA_IN_IRQ);&lt;/STRONG&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;So, you can comment &lt;STRONG&gt;EnableIRQ(BOARD_DATA_IN_IRQ);&lt;/STRONG&gt; Then try it again, whether you still can enter the interrupt or not?&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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 style="min- padding: 0px;"&gt;&amp;nbsp;&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, 13 Nov 2019 01:50:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/clearing-interrupt-status-flag-is-not-working/m-p/1023121#M56306</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2019-11-13T01:50:44Z</dc:date>
    </item>
  </channel>
</rss>

