<?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: Periodic Timers - Help? in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156482#M812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK...so there is a feature beautifully hidden across two websites and four different sources of documentation, called _bsp_init_interrupt, which sets up the NVIC for my timer.&lt;IMG alt=":robotindifferent:" class="emoticon emoticon-robotindifferent" id="robotindifferent" src="http://freescale.i.lithium.com/i/smilies/16x16_robot-indifferent.gif" title="Robot Indifferent" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Spent a happy morning attaching the ISR to a GPIO pin on my target, and hoped to see a regular toggle of the GPIO pin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nope.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first time I run the target (under J-link) the pin gets toggled, then stays high.&amp;nbsp; If I break the execution, then continue it, the pin gets toggled low, then stays that way.&amp;nbsp; etc. etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every time I break and continue, the pin gets toggled.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;IMG alt=":robotmad:" class="emoticon emoticon-robotmad" id="robotmad" src="http://freescale.i.lithium.com/i/smilies/16x16_robot-mad.gif" title="Robot Mad" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Aug 2011 19:43:01 GMT</pubDate>
    <dc:creator>OldNick</dc:creator>
    <dc:date>2011-08-05T19:43:01Z</dc:date>
    <item>
      <title>Periodic Timers - Help?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156481#M811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anybody know how to get the peridic timers up on a Kinetis in MQX 370?&lt;/P&gt;&lt;P&gt;I've got th eregisters configures, and followed the ISR example to chain an interrupt handler.&lt;/P&gt;&lt;P&gt;The counter counts down, the interrupt bit gets set, but the ISR is not being called.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure I want to install a kernel interrupt if the vectors might be/are in ROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;:?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 22:06:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156481#M811</guid>
      <dc:creator>OldNick</dc:creator>
      <dc:date>2011-08-04T22:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Periodic Timers - Help?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156482#M812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK...so there is a feature beautifully hidden across two websites and four different sources of documentation, called _bsp_init_interrupt, which sets up the NVIC for my timer.&lt;IMG alt=":robotindifferent:" class="emoticon emoticon-robotindifferent" id="robotindifferent" src="http://freescale.i.lithium.com/i/smilies/16x16_robot-indifferent.gif" title="Robot Indifferent" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Spent a happy morning attaching the ISR to a GPIO pin on my target, and hoped to see a regular toggle of the GPIO pin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nope.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first time I run the target (under J-link) the pin gets toggled, then stays high.&amp;nbsp; If I break the execution, then continue it, the pin gets toggled low, then stays that way.&amp;nbsp; etc. etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every time I break and continue, the pin gets toggled.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;IMG alt=":robotmad:" class="emoticon emoticon-robotmad" id="robotmad" src="http://freescale.i.lithium.com/i/smilies/16x16_robot-mad.gif" title="Robot Mad" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 19:43:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156482#M812</guid>
      <dc:creator>OldNick</dc:creator>
      <dc:date>2011-08-05T19:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Periodic Timers - Help?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156483#M813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;E&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;youtiful...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the Kinetis Errata for OM33Z&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;e2682: PIT: Does not generate a subsequent interrupt after clearing the interrupt flag&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Errata type: Errata&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Description: The PIT does not generate a subsequent interrupt after clearing the interrupt flag in the ISR&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;upon receiving the first interrupt. Thus, the second interrupt will never be triggered.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Workaround: In order to enable the use of subsequent interrupts from the PIT, the user must access any PIT&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;register after clearing the interrupt flag in the ISR.﻿&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Turns out that because I had the memory window open on the registers, every time I stopped the debugger I was clearing the error by accident.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Put in a read of PIT_CVAL at the bottom of the interrupt handler and all is well&lt;IMG alt=":robottongue:" class="emoticon emoticon-robottongue" id="robottongue" src="http://freescale.i.lithium.com/i/smilies/16x16_robot-tongue.gif" title="Robot tongue" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 22:38:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156483#M813</guid>
      <dc:creator>OldNick</dc:creator>
      <dc:date>2011-08-05T22:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Periodic Timers - Help?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156484#M814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I experienced the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try reading either the CLVAL or LDVAL register in your PIT interrupt handler. I think that will solve your problem. You don't have to do anything with the value, just read the register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This behavior does not appear to be documented, . . . &amp;nbsp;maybe it wasn't intentional. In any case, after reading CVAL upon a PIT interrupt, you should get repeated PIT interrupts.&amp;nbsp;I have forwarded this problem to Freescale and they are looking at it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this works for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 03:09:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156484#M814</guid>
      <dc:creator>tr9</dc:creator>
      <dc:date>2011-08-09T03:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Periodic Timers - Help?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156485#M815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but see my last post.&lt;/P&gt;&lt;P&gt;Kinetis early silicon - errata.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read CVAL in the interrupt handler and it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just like you said.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 14:27:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Periodic-Timers-Help/m-p/156485#M815</guid>
      <dc:creator>OldNick</dc:creator>
      <dc:date>2011-08-09T14:27:14Z</dc:date>
    </item>
  </channel>
</rss>

