<?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: Simple example of Quad Timer for the MIMXRT1052DV6JB in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Simple-example-of-Quad-Timer-for-the-MIMXRT1052DV6JB/m-p/1587000#M23415</link>
    <description>&lt;P&gt;In the end I got it working, although I still don't really understand why.&amp;nbsp; The quad timer for PWM uses the&amp;nbsp;&lt;STRONG&gt;IP Bus global clock (kCLOCK_IpgClk)&lt;/STRONG&gt;, which ticks at 150 MHz.&amp;nbsp; For some reason I need to divide this by three and use that value, 50 MHz, as the clock frequency (srcClock_Hz).&amp;nbsp; Then to achieve smaller divisions (lower frequencies) I can specify the&amp;nbsp;&lt;STRONG&gt;primarySource&lt;/STRONG&gt; property of the &lt;STRONG&gt;qtmr_config_t&lt;/STRONG&gt; object to be anything from &lt;STRONG&gt;kQTMR_ClockDivide_1&lt;/STRONG&gt;&amp;nbsp;to&amp;nbsp;&lt;STRONG&gt;kQTMR_ClockDivide_128&lt;/STRONG&gt;.&amp;nbsp; (kQTMR_ClockDivide_128 was the "larger divider" I was seeking in my original post.)&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 09:10:53 GMT</pubDate>
    <dc:creator>ed_graham</dc:creator>
    <dc:date>2023-01-24T09:10:53Z</dc:date>
    <item>
      <title>Simple example of Quad Timer for the MIMXRT1052DV6JB</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Simple-example-of-Quad-Timer-for-the-MIMXRT1052DV6JB/m-p/1585730#M23357</link>
      <description>&lt;P&gt;I am new to firmware programming and would like some help setting up a quad timer for PWM.&amp;nbsp; I am using the&amp;nbsp;&lt;STRONG&gt;QTMR_SetupPwm&lt;/STRONG&gt;() function in file &lt;STRONG&gt;fsl_qtmr.c&lt;/STRONG&gt; from the SDK.&amp;nbsp; I don't know what value to supply for the source clock frequency (parameter&amp;nbsp;&lt;STRONG&gt;srcClock_Hz&lt;/STRONG&gt;); presumably this relates to the particular processor I am using.&amp;nbsp; Is it the frequency written in the data sheet for the&amp;nbsp;i.MX RT1050, namely 600 MHz?&lt;/P&gt;&lt;P&gt;I'm trying to create pulses of varying frequencies ranging from 1 Hz to 25 KHz.&amp;nbsp; For each frequency, I need to set the duty cycles so that the signal stays low for a specified number of microseconds.&amp;nbsp; I'm a bit confused as to how to specify the parameters to&amp;nbsp;&lt;STRONG&gt;QTMR_SetupPwm&lt;/STRONG&gt;() in order to achieve this.&amp;nbsp; In particular, I often fall foul of the assertions on these lines:&lt;/P&gt;&lt;PRE&gt; /* This should not be a 16-bit overflow value. If it is, change to a larger divider for clock source. */&lt;BR /&gt;assert(highCount &amp;lt;= 0xFFFFU);&lt;BR /&gt;assert(lowCount &amp;lt;= 0xFFFFU);&lt;/PRE&gt;&lt;P&gt;How do I "change to a larger divider for clock source"?&amp;nbsp; What does that actually mean?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 21:39:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Simple-example-of-Quad-Timer-for-the-MIMXRT1052DV6JB/m-p/1585730#M23357</guid>
      <dc:creator>ed_graham</dc:creator>
      <dc:date>2023-01-19T21:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Simple example of Quad Timer for the MIMXRT1052DV6JB</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Simple-example-of-Quad-Timer-for-the-MIMXRT1052DV6JB/m-p/1587000#M23415</link>
      <description>&lt;P&gt;In the end I got it working, although I still don't really understand why.&amp;nbsp; The quad timer for PWM uses the&amp;nbsp;&lt;STRONG&gt;IP Bus global clock (kCLOCK_IpgClk)&lt;/STRONG&gt;, which ticks at 150 MHz.&amp;nbsp; For some reason I need to divide this by three and use that value, 50 MHz, as the clock frequency (srcClock_Hz).&amp;nbsp; Then to achieve smaller divisions (lower frequencies) I can specify the&amp;nbsp;&lt;STRONG&gt;primarySource&lt;/STRONG&gt; property of the &lt;STRONG&gt;qtmr_config_t&lt;/STRONG&gt; object to be anything from &lt;STRONG&gt;kQTMR_ClockDivide_1&lt;/STRONG&gt;&amp;nbsp;to&amp;nbsp;&lt;STRONG&gt;kQTMR_ClockDivide_128&lt;/STRONG&gt;.&amp;nbsp; (kQTMR_ClockDivide_128 was the "larger divider" I was seeking in my original post.)&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 09:10:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Simple-example-of-Quad-Timer-for-the-MIMXRT1052DV6JB/m-p/1587000#M23415</guid>
      <dc:creator>ed_graham</dc:creator>
      <dc:date>2023-01-24T09:10:53Z</dc:date>
    </item>
  </channel>
</rss>

