<?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: Has anybody used Timer Overflow Flag with the QTMR? in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920479#M3572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;What should I evaluate first so as not to falsify the value in the event of an overflow?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;I don't understand what you mean by "falsify the value". What value? The Capture Value? The relationship between two close interrupts? If you are capturing a timer value that overflows and need to know whether the capture was "just before" or "just after" the interrupt, then nothing is going to help you with that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;So I assume you mean "&lt;/SPAN&gt;&lt;/SPAN&gt;how do I handle one interrupt so as not to accidentally clear the other one?". If that isn't what you are asking, then you should consider it as it is a risk that needs to be dealt with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code, as written, will miss and lose interrupts. But nothing in the sample code or the manuals will help you with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There has been a lot of old (30 years ago) modules where it wasn't possible to avoid accidentally clearing interrupts. They had "status" registers with different bits for different interrupts, and writing to those bits would set or clear them. Between reading the register (to find which interrupt had happened) and writing it to clear that interrupt, another one could be set and you would then accidentally clear it, losing that interrupt forever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Motorola championed a standard way around this problem. When an interrupt bit was set, the only way to clear it is to write a ONE to that bit. This allows you to clear any interrupt at any time with no risk of accidentally clearing another one. This is called "W1C" in the manuals (160 instances). Most interrupt status registers in the IMXRT still work this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MC68HC11, released in 1984 and documented in the 1991 68HC11K4 manual I have in front of me now worked that way. This is "the standard way it has been done" for at least 30 years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the Quad Timer doesn't follow this tradition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please read the post I made in this thread on "&lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" href="https://community.nxp.com/thread/504033?commentID=1316112&amp;amp;et=watches.email.thread#comment"&gt;Jun 5, 2019 12:59 PM&lt;/A&gt;&lt;/SPAN&gt;"&amp;nbsp; (immediately below this post) where I detail this anomaly, and give the overly complicated code that you have to use to handle this properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does the NXP Sample Code clear these interrupts? Does it get it right? Yet?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that wasn't your question, please try again with more detail about what you are trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you want to use PWM or generate signals or interrupts at the frequency you expect, check the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/520134"&gt;i.MXRT Quad Timer (QTMR): Are There Any Working Code Examples? &lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Add for ARM errata 838869, affects Cortex-M4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What CPU are you using? The IMXRT1021, 1050 and 1060 use Cortex-M7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 May 2020 12:51:58 GMT</pubDate>
    <dc:creator>TomE</dc:creator>
    <dc:date>2020-05-25T12:51:58Z</dc:date>
    <item>
      <title>Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920458#M3551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am convinced that the Timer Overflow flag (Bit 13 of TMRx_SCTRLn) does not work.&lt;/P&gt;&lt;P&gt;I have configured my timer to count from 0x0000 to 0xffff, then overflow. I have set the Compare to 0x7fff so I can be sure that the timer is not being reset by the Compare.&lt;/P&gt;&lt;P&gt;I can see the TMRx_CNTR counting from 0x000 to 0xffff, but TOF is always zero.&lt;/P&gt;&lt;P&gt;I can see the Compare flag TCF functions as I expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of the examples use the Compare flag / interrupt, none of them use the Overflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried both TMR1 and TMR2, and different channels on both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reference:&lt;/P&gt;&lt;P&gt;SCTRL = 0x9000: TCF=1, TOFIE=1.&lt;/P&gt;&lt;P&gt;COMP1 = 0x7fff&lt;/P&gt;&lt;P&gt;CTRL = 0x3e00: CM=1, count rising of primary source, PCS=1111, Count source is IP Bus div 128, Count repeatedly, Length=0, rollover at 0xffff, count up.&lt;/P&gt;&lt;P&gt;ENBL = 0x000f: timers enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody seen this feature actually work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Chris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2019 10:40:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920458#M3551</guid>
      <dc:creator>chriscowdery</dc:creator>
      <dc:date>2019-05-29T10:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920459#M3552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To give you better support, could you please tell me which RT are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 22:52:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920459#M3552</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-06-03T22:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920461#M3554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Epic answer - thanks!&lt;/P&gt;&lt;P&gt;You clearly have investigated much more than I have.&lt;/P&gt;&lt;P&gt;My solution was to switch to GPT1 as they have the more sensible W1C status flags, and appear to work correctly for my application (in which because GPT1 is 32bit, I don't need the overflow interrupt, I just need the compare interrupt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good point about the 'archaeology' - you wonder how many other parts have this defect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2019 06:32:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920461#M3554</guid>
      <dc:creator>chriscowdery</dc:creator>
      <dc:date>2019-06-04T06:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920462#M3555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Victor,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am using the iMXRT1021, on an MIMXRT1020-EVK. However it sounds like the same peripheral is used in the iMXRT1050 as Tom can see exactly the same issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2019 06:33:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920462#M3555</guid>
      <dc:creator>chriscowdery</dc:creator>
      <dc:date>2019-06-04T06:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920463#M3556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; the 56F824X_825X and Kinetis KM3x CPUs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Google also finds the Freescale MC1322x Zigbee SOC, which dates from 2012 or maybe 2007. It also finds the MC56F8006, which has a "dual" version of this timer with only two out of the four timers implemented. It also turns up in other "56" series DSC chips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2019 02:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920463#M3556</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2019-06-05T02:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920464#M3557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Victor, could you please find out if this is a known problem with this module in these i.MXRT chips and let us know?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might also be worth finding out if the same problem is in this module in the Kinetis, DSP and Zigbee chips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2019 06:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920464#M3557</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2019-06-11T06:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920465#M3558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom and Chris, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm making some tests on my side to reproduce the behavior that Tom mentioned before (overflow only happens when counting down). I will give an update as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2019 20:41:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920465#M3558</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-06-11T20:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920466#M3559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom and Chris, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to reproduce the behavior that you both mentioned. I'm currently checking with the applications team, I will give you an update when I have the final answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2019 18:12:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920466#M3559</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-06-13T18:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920467#M3560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom and Chris, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The design team confirmed that this issue is valid and is an errata. They are working on an errata for the Qtimer module, this errata will cover all the i.MXRT families.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2019 16:03:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920467#M3560</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-06-17T16:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920468#M3561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Victor. I wonder if there is a workaround...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 06:31:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920468#M3561</guid>
      <dc:creator>chriscowdery</dc:creator>
      <dc:date>2019-06-18T06:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920469#M3562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chris, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late response, I was checking this with the design team. Besides of using counting down, you can also&amp;nbsp;enable the compare event, setting the compare value to maximum value, then enable the compare&lt;BR /&gt;interrupt. With this method, the compare interrupt has a same result of timing as the overflow interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:20:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920469#M3562</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-07-01T15:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920470#M3563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Victor,&lt;/P&gt;&lt;P&gt;&amp;nbsp;But that solution means you have to choose - overflow OR compare. You cannot have both. My application required both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:37:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920470#M3563</guid>
      <dc:creator>chriscowdery</dc:creator>
      <dc:date>2019-07-01T15:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920471#M3564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chris, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use both overflow and compare the only possible way would be to count backward. Sorry for the inconvenience that this might cause you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2019 22:27:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920471#M3564</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-07-02T22:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920472#M3565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This has been reported in the latest IMXRT1050 Errata:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/errata/IMXRT1050CE.pdf" rel="nofollow noopener noreferrer" title="https://www.nxp.com/docs/en/errata/IMXRT1050CE.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/errata/IMXRT1050CE.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ERR050194QTMR: Overflow flag and related interrupt cannot be generated
 when the timer is configured as upward count mode


Description:
    1. Overflow flag and related interrupt cannot be generated successfully in upward count mode.
    2. When TMR_CTRL[OUTMODE] is set to 110b, OFLAG output is not cleared on counter rollover
       when the timer counts upward.

Workarounds:
    For item 1, using compare interrupt instead of overflow interrupt by setting compare value to
    0xFFFF. The compare interrupt has the same timing effect as overflow interrupt in this way.
    For item 2, there is no workaround.

Proposed Solution:
    No fix scheduled

Software Status:
    Software workaround is not in SDK
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this bug also exist in the IMXRT1060?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There hasn't been a new Errata released for the IMXRT1060 mentioning this if it is a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&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;SPAN style="left: 121.277px; top: 109.795px; font-size: 19.451px; font-family: sans-serif; transform: scaleX(0.945352);"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 03:08:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920472#M3565</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2019-08-23T03:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920473#M3566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've just run a test with the IMXRT1060 and have verified that the QTIMER module in this chip has the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please add this to a new version of the IMXRT1060 Errata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2019 01:15:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920473#M3566</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2019-08-26T01:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920474#M3567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tom, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please download the newest version of the Errata, the problem of the QTIMER is already included (&lt;A href="https://www.nxp.com/docs/en/nxp/errata/IMXRT1060CE.pdf"&gt;link&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2019 16:52:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920474#M3567</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-08-26T16:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920475#M3568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, you are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the IMXRT1060 and IMXRT1060 Errata documents were updated in June 2019 and ERR050194 was added at that time to both of them. The IMXRT1050 errata was further updated in August 2019, and the only change was that ERR050194 was updated. ERR050194 is currently identical in both documents, so I don't know what was different in the June 2019 IMXRT1050 one that needed to be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only noticed "ERR050194" was in the August Update and assumed the item wasn't in the IMXRT1060 one when it was.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2019 00:36:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920475#M3568</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2019-08-27T00:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920476#M3569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;SPAN lang="en"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;SPAN lang="en"&gt;unfortunately it doesn't work for me:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;QTMR_SetupInputCapture(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, QTMR_CounterInputPin, false, true,&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;kQTMR_RisingEdge);&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;/* Set the first channel period to be 1 millisecond */&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;QTMR_SetTimerPeriod(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, 0xFFFF);&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;// Enable at the NVIC&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;EnableIRQ(QTMR_IRQ_ID);&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;// Enable timer compare interrupt&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;QTMR_EnableInterrupts(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, kQTMR_EdgeInterruptEnable | kQTMR_CompareInterruptEnable);&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;// Start the input channel to count on rising edge of the primary source clock&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;QTMR_StartTimer(BOARD_QTMR_BASEADDR, BOARD_QTMR_INPUT_CAPTURE_CHANNEL, kQTMR_PriSrcRiseEdge);&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0cm;"&gt;&lt;SPAN lang="en"&gt;Please put out an example.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2020 15:22:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920476#M3569</guid>
      <dc:creator>johannzimmerman</dc:creator>
      <dc:date>2020-05-22T15:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920477#M3570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;SPAN lang="en"&gt;unfortunately it doesn't work for me:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which part exactly? There are fault reports and workarounds. It isn't clear what you're doing, what you're expecting and what results you're getting. Are you expecting an overflow interrupt counting DOWN (as suggested as the workaround) or are you expecting a compare interrupt? You should include what you expect to happen and what actually is happening. Including the status registers showing interrupt request status and masks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You include&amp;nbsp; some code, but without the details of what library you're using. I managed to locate the header that defines those functions, but it would help if you detailed what you were using, and what version, in case it has changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't see the call to "QTMR_Init()". I can't see your interrupt service routines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2020 14:21:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920477#M3570</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2020-05-24T14:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Has anybody used Timer Overflow Flag with the QTMR?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920478#M3571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;BR /&gt;thanks for the reply and sorry apologize.&lt;BR /&gt;that was really my mistake to have lost the QTMR_Init ().&lt;BR /&gt;I expect a compare interrupt when counting up.&lt;BR /&gt;This also works with the call from the front&lt;BR /&gt;QTMR_Init () function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;At low input frequencies the interrupt happens for compare and edge at the same time.&lt;/SPAN&gt; &lt;SPAN class="" title=""&gt;What should I evaluate first so as not to falsify the value in the event of an overflow?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void QTMR_IRQ_HANDLER(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint16_t reg = BOARD_QTMR_BASEADDR-&amp;gt;CHANNEL[BOARD_QTMR_INPUT_CAPTURE_CHANNEL].SCTRL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((reg &amp;amp; TMR_SCTRL_TOF_MASK) != 0U)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; // Only works with countdown&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg &amp;amp;= (~TMR_SCTRL_TOF_MASK);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmr_capt_ovr++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; // What first evaluate compare or edge ??&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((reg &amp;amp; TMR_SCTRL_TCF_MASK) != 0U)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg &amp;amp;= (~TMR_SCTRL_TCF_MASK);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmr_capt_ovr++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Input edge flag &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (reg &amp;amp; TMR_SCTRL_IEF_MASK)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg &amp;amp;= (uint16_t)(~(TMR_SCTRL_IEF_MASK|TMR_SCTRL_TCF_MASK));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmr_capt_act = (tmr_capt_ovr&amp;lt;&amp;lt; 16) | BOARD_QTMR_BASEADDR-&amp;gt;CHANNEL[BOARD_QTMR_INPUT_CAPTURE_CHANNEL].CAPT;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmr_capt_cnt++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(++test==2)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qtmrIsrFlag = true;&amp;nbsp; // &lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;they were both active&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmr_capt_ovr = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Clear interrupt flag.*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOARD_QTMR_BASEADDR-&amp;gt;CHANNEL[BOARD_QTMR_INPUT_CAPTURE_CHANNEL].SCTRL = reg;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exception return operation might vector to incorrect interrupt */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __DSB();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;BR /&gt;Johann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2020 11:31:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Has-anybody-used-Timer-Overflow-Flag-with-the-QTMR/m-p/920478#M3571</guid>
      <dc:creator>johannzimmerman</dc:creator>
      <dc:date>2020-05-25T11:31:22Z</dc:date>
    </item>
  </channel>
</rss>

