<?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 Kinetis ML05Z Missing Interrupts in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274805#M9645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Setup: FDRM-KL05Z &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;CPU runs at 48MHz. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;CodeWarrior Version: 10.3 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Input: Digital signal on PTB6 pin. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Signal Frequency: 38KHz &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I'm using ExtInt component to generate interrupt on both edges of &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;the digital input signal. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;The problem: Every now and then, I miss interrupts. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Test program: In the ISR (Events.c) I just read the pin value &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;(using the GetVal method), and check if the current value of the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;input is the same as the value received in the previous ISR. If we &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;do not miss interrupts, the value should be different, since the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;signal must come down before it goes up again. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;The result I get is that occasionally I get the same value twice.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Dec 2013 10:19:17 GMT</pubDate>
    <dc:creator>orenkapah</dc:creator>
    <dc:date>2013-12-22T10:19:17Z</dc:date>
    <item>
      <title>Kinetis ML05Z Missing Interrupts</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274805#M9645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Setup: FDRM-KL05Z &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;CPU runs at 48MHz. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;CodeWarrior Version: 10.3 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Input: Digital signal on PTB6 pin. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Signal Frequency: 38KHz &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;I'm using ExtInt component to generate interrupt on both edges of &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;the digital input signal. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;The problem: Every now and then, I miss interrupts. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;Test program: In the ISR (Events.c) I just read the pin value &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;(using the GetVal method), and check if the current value of the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;input is the same as the value received in the previous ISR. If we &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;do not miss interrupts, the value should be different, since the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;signal must come down before it goes up again. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: Arial, Helvetica, sans-serif; font-size: small; background-color: #f5f5f5;"&gt;The result I get is that occasionally I get the same value twice.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Dec 2013 10:19:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274805#M9645</guid>
      <dc:creator>orenkapah</dc:creator>
      <dc:date>2013-12-22T10:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis ML05Z Missing Interrupts</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274806#M9646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oren,&lt;/P&gt;&lt;P&gt;Maybe the time between run into EInt1 interrupt twice is too short.&lt;/P&gt;&lt;P&gt;If you change the pulse width of your signal, still will that happen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that help.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 02:42:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274806#M9646</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2013-12-23T02:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis ML05Z Missing Interrupts</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274807#M9647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robin for your answer, but unfortunately this is not the case.&lt;/P&gt;&lt;P&gt;As I said the CPU clock is 48MHz and the signal carrier frequency is 38KHz, so there shouldn't be any problem there.&lt;/P&gt;&lt;P&gt;Moreover, when I run my program in busy-wait method (reading the signal value over and over until the value is changed) &lt;/P&gt;&lt;P&gt;from the application level, it works correctly, doing a lot &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;more then just checking the signal value. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Needless to say, that this is not a way to write the program in busy-wait method.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 08:04:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274807#M9647</guid>
      <dc:creator>orenkapah</dc:creator>
      <dc:date>2013-12-23T08:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis ML05Z Missing Interrupts</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274808#M9648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly I would ask if you KNOW that you aren't getting 'double' interrupts on any one edge (edge rate, noise induced)?&amp;nbsp; You might turn on bit PFE for filtering on the pin (if available???).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second concern is ALWAYS whether something else is 'holding off' interrupts on you for tens of microseconds.&amp;nbsp; You might change 'global' interrupt disables into priority-level disables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUBLIC uint32_t _IntsDisableCount; // count of performed disables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define DISABLE_INT()&amp;nbsp;&amp;nbsp;&amp;nbsp; _IntsDisableCount++;\&lt;/P&gt;&lt;P&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;&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; __set_BASEPRI( 0x40L );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //All OTHER device interrupts on Level &amp;gt;=1, disable them&lt;/P&gt;&lt;P&gt;#define ENABLE_INT()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(--_IntsDisableCount==0) \&lt;/P&gt;&lt;P&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __set_BASEPRI( 0 );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //If we get back to 'base level', enable all interrupts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and put your 38KHz on a 'high' priority:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set_irq_priority(INT_PORTB-16, 0);&amp;nbsp;&amp;nbsp;&amp;nbsp; //Highest priority, for timely handling&lt;/P&gt;&lt;P&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; //Also makes this&amp;nbsp; IRQ handler Uninterruptible.&lt;/P&gt;&lt;P&gt;For that to work, you also have to set "everybody else's priority" to two (or such).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 19:22:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274808#M9648</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2013-12-23T19:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis ML05Z Missing Interrupts</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274809#M9649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MKL05Z32VFM4 on your FRDM-KL05 board does support Digital Glitch Filter function.You can see it at Table 3-47. Ports Summary in "KL05P48M48SF1RM".&lt;/P&gt;&lt;P&gt;So if your signal with noise , the ExInt will happen so frequently that the last ISR have not done even.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alought I know when you use &lt;SPAN style="font-size: 10pt;"&gt; busy-wait method can get different state.The &lt;SPAN style="font-size: 10pt;"&gt; busy-wait method can get correct is because it runs very fast.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But your ExInt have long code in ISR, you can see PE_ISR(ExtIntLdd1_Interrupt) in ExtIntLdd1.c.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can watch your signal using oscilloscope to confirm whether the signal is correct.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&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>Thu, 26 Dec 2013 02:19:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274809#M9649</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2013-12-26T02:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis ML05Z Missing Interrupts</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274810#M9650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I must be misunderstanding something about Table 3-47, as what I see in Rev 3.1 of said manual is that the only pins with any available filtering is PFE on !RESET (PTA1) and NMI (PTB5).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 17:27:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-ML05Z-Missing-Interrupts/m-p/274810#M9650</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2013-12-26T17:27:09Z</dc:date>
    </item>
  </channel>
</rss>

