<?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: LPC865 MRT not regular interval in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1740626#M54429</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/56838"&gt;@rmaier&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide images from the osciloscope please?&lt;/P&gt;
&lt;P&gt;I'm looking into your issue.&lt;/P&gt;
&lt;P&gt;Best Regards, Miguel.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 18:44:24 GMT</pubDate>
    <dc:creator>Miguel04</dc:creator>
    <dc:date>2023-10-16T18:44:24Z</dc:date>
    <item>
      <title>LPC865 MRT not regular interval</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1739619#M54398</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Nullify this. There was a spurious interrupt from elsewhere causing an issue. Problem solved.&lt;/P&gt;&lt;P&gt;I am using the MRT to generate a fixed pulse on a GPIO output. However, depending on the command INTVAL the MRT timer has a longer or shorter interval actually being revealed.&lt;/P&gt;&lt;P&gt;The core is running at 60MHz. When the timer is loaded with anything above 15,600 the actual output as measured on a scope on the GPIO output is 246 us longer. When the INTVAL is loaded with anything below 15,000 the output is 7 us shorter than expected. It's a consistent offset 15,600 or 600,000 all is 246 us longer than expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code launching the MRT timer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;void mrt_Launch(uint32_t val)
{
    val = 60 * (val);
    MRT0-&amp;gt;CHANNEL[0].INTVAL = val | MRT_CHANNEL_INTVAL_LOAD(0b1);
    MRT0-&amp;gt;CHANNEL[0].STAT turnon MRT_CHANNEL_STAT_INTFLAG_MASK;
    PIN_CLEAR(GPIO_XYZ_PORT, GPIO_XYZ_PIN);
    MRT0-&amp;gt;CHANNEL[0].STAT turnon MRT_CHANNEL_STAT_RUN(0b1);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the interrupt is handled like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;void MRT0_IRQHandler()
{
    if (MRT0-&amp;gt;CHANNEL[0].STAT &amp;amp; MRT_CHANNEL_STAT_INTFLAG_MASK)
    {
        PIN_SET(GPIO_XYZ_PORT, GPIO_XYZ_PIN);
        MRT0-&amp;gt;CHANNEL[0].STAT turnon MRT_CHANNEL_STAT_INTFLAG_MASK;
        MRT0-&amp;gt;CHANNEL[0].STAT turnon MRT_CHANNEL_STAT_RUN(0b0);
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, based on this an input for val over 260 has a 246 us longer interval, and a val of under 250 is 7 us shorter interval.&lt;/P&gt;&lt;P&gt;I didn't see anything directly addressing this in the user manual. Any tips for what I'm doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 16:24:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1739619#M54398</guid>
      <dc:creator>rmaier</dc:creator>
      <dc:date>2023-10-13T16:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC865 MRT not regular interval</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1739649#M54400</link>
      <description>&lt;P&gt;I've attached an image of the chart of measured vs command MRT timer interval in another test. There is a marked step around 64,000 ticks. It's not 65535, but it's awfully close.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MRT_Curve.png" style="width: 760px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/245076i9A42DF207FCBBC70/image-size/large?v=v2&amp;amp;px=999" role="button" title="MRT_Curve.png" alt="MRT_Curve.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 16:16:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1739649#M54400</guid>
      <dc:creator>rmaier</dc:creator>
      <dc:date>2023-10-13T16:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC865 MRT not regular interval</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1740626#M54429</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/56838"&gt;@rmaier&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide images from the osciloscope please?&lt;/P&gt;
&lt;P&gt;I'm looking into your issue.&lt;/P&gt;
&lt;P&gt;Best Regards, Miguel.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 18:44:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1740626#M54429</guid>
      <dc:creator>Miguel04</dc:creator>
      <dc:date>2023-10-16T18:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC865 MRT not regular interval</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1740642#M54430</link>
      <description>&lt;P&gt;Hello Miguel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem has been resolved. I discovered a spurious interrupt that was launching another MRT event. Since it was overlapping it wasn't immediately evident on the scope trace. Root cause: User error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 19:16:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1740642#M54430</guid>
      <dc:creator>rmaier</dc:creator>
      <dc:date>2023-10-16T19:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC865 MRT not regular interval</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1741508#M54461</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/56838"&gt;@rmaier&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm glad you were able to solve it.&lt;/P&gt;
&lt;P&gt;Please let us know if you have another question.&lt;/P&gt;
&lt;P&gt;Best Regards, Miguel.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 18:19:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC865-MRT-not-regular-interval/m-p/1741508#M54461</guid>
      <dc:creator>Miguel04</dc:creator>
      <dc:date>2023-10-17T18:19:35Z</dc:date>
    </item>
  </channel>
</rss>

