<?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: PIT interrupt missed in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541422#M6991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OOPS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had an issue with the declaration of a variable used in the isr. The net result was it was apparently getting stepped on elsewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, no problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2016 17:56:44 GMT</pubDate>
    <dc:creator>larryo</dc:creator>
    <dc:date>2016-08-19T17:56:44Z</dc:date>
    <item>
      <title>PIT interrupt missed</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541419#M6988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On a KL05.. using PE, I set up an interrupt from a PIT. Within the ISR I toggle a port bit just to check the functionality. I find that the port bit does not change on every expected tic of the PIT. The timing is correct except that a state change is missed once in awhile. For example if I set the PIT to 1ms, sometimes there will be a 2, 3 or 4 ms interval instead of the expected 1ms. I can change the source to other timers and it makes no difference. I can also change the timer interval from 1ms to 100ms and it still will miss once in awhile.&lt;/P&gt;&lt;P&gt;The miss rate has to do with other code that is running. If I only have a while(1) loop it's fine. If I add almost anything within the while loop it will start to miss.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Originally I had a number of print statements and this seemed to make matters much worse. However even when I comment out almost the entire contents of the while loop it will still happen on occasion.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like something else is messing with the timer or disabling the interrupts. Also, changing the priority has no effect. As far as I know, no other interrupts are enabled.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck. Anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 04:10:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541419#M6988</guid>
      <dc:creator>larryo</dc:creator>
      <dc:date>2016-08-19T04:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: PIT interrupt missed</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541420#M6989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Larry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you measure it ?&lt;/P&gt;&lt;P&gt;And in the interrupt function , do you only toggle the LED ?&lt;/P&gt;&lt;P&gt;If there is no other interrupt , also the time of interrupt function is less than&lt;/P&gt;&lt;P&gt;1ms , i think there should be not error .&lt;/P&gt;&lt;P&gt;Also you can send your project to me , i check it on my side .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 07:10:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541420#M6989</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-08-19T07:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: PIT interrupt missed</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541421#M6990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an Oscilloscope connected to the port bit. The scope has a handy trigger function of trigger if &amp;gt; n. With a 1ms PIT, I set the trigger to &amp;gt; 1.1ms and see a period that is actually a multiple of 1ms once in awhile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only thing in the isr is the toggle LED. I do use PE macros for the I/O bit control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With almost nothing going on in the main loop, the period of the &amp;gt; 1.1ms event is periodic at around 1 second. There is a software counter in the main loop with a period of about 1 second also. This is all within a while(1) loop. Curious coincidence?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I originally had some A/D reads, print statements and some floating point in the while loop. In this condition the PIT "misses" were quite often. I incrementally commented out code in the while(1) and the miss incidence went down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I comment out the entire contents of the while loop except one function call the issue goes away. I suppose that at some point the compiler is optimizing out the entire while loop but I have not dug into this aspect of the question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did just realize that I am actually using CW 10.6 and not KDS so I'm thinking this might be an issue in sending you the project or even having posted the question here?&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;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 13:13:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541421#M6990</guid>
      <dc:creator>larryo</dc:creator>
      <dc:date>2016-08-19T13:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: PIT interrupt missed</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541422#M6991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OOPS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had an issue with the declaration of a variable used in the isr. The net result was it was apparently getting stepped on elsewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, no problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 17:56:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PIT-interrupt-missed/m-p/541422#M6991</guid>
      <dc:creator>larryo</dc:creator>
      <dc:date>2016-08-19T17:56:44Z</dc:date>
    </item>
  </channel>
</rss>

