<?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: PWM output error using IMXRT SDK in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/PWM-output-error-using-IMXRT-SDK/m-p/1465861#M19823</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The PWM example in SDK generates a 1KHz signal from PWM submodule_0 and submodule_1 in complementary mode. I want to run a servo motor using PWM. The servo uses a 50Hz signal i.e. 20ms. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, anyone can help me where the modification is required for the same?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using imxrt 1176.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 May 2022 01:14:12 GMT</pubDate>
    <dc:creator>Devaharsha</dc:creator>
    <dc:date>2022-05-30T01:14:12Z</dc:date>
    <item>
      <title>PWM output error using IMXRT SDK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/PWM-output-error-using-IMXRT-SDK/m-p/1182112#M11227</link>
      <description>&lt;P&gt;Customer has problem for PWM generation with SDK demo code, which can generate 2000,3000 and 5000Hz PWM properly, but failed to generate 500Hz PWM. Pls assign this ticket to&amp;nbsp;dean jia, who has got email about it. Thanks.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;May&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 08:03:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/PWM-output-error-using-IMXRT-SDK/m-p/1182112#M11227</guid>
      <dc:creator>xiumei_li</dc:creator>
      <dc:date>2020-11-12T08:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: PWM output error using IMXRT SDK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/PWM-output-error-using-IMXRT-SDK/m-p/1182191#M11231</link>
      <description>&lt;P&gt;Hi May,&lt;/P&gt;
&lt;P&gt;A PWM counter's modulo would be the ratio between the counter clock frequency and the target PWM frequency. The modulo&amp;nbsp; has a maximum value of 65,536, as the counters are 16-bit length.&lt;/P&gt;
&lt;P&gt;In the example the IPG clock is 50MHz, and the counter prescaler bit field is 0, and the target PWM frequency is 500Hz. So the ratio is 50,000,000 / (2^0) /500 = 100,000 &amp;gt; 65,536&lt;/P&gt;
&lt;P&gt;To solve the problem the prescaler is supposed to be configured to a proper value. For example, let's configure the IPG clock to be the conventional 150MHz, and the prescaler to be 8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;    CLOCK_SetDiv(kCLOCK_AhbDiv, 0x0); /* Set AHB PODF to 0, divide by 1, 600Mz/1=600MHz */
    CLOCK_SetDiv(kCLOCK_IpgDiv, 0x3); /* Set IPG PODF to 3, divede by 4, 600MHz/4=150MHz */
    pwmConfig.prescale = kPWM_Prescale_Divide_8;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With these modifications, the ration would be 150,000,000 / 8 /500 = 37,500 &amp;lt; 65,536, which is acceptable by a counter's modulo.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 09:26:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/PWM-output-error-using-IMXRT-SDK/m-p/1182191#M11231</guid>
      <dc:creator>dean_jia</dc:creator>
      <dc:date>2020-11-12T09:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: PWM output error using IMXRT SDK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/PWM-output-error-using-IMXRT-SDK/m-p/1465861#M19823</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The PWM example in SDK generates a 1KHz signal from PWM submodule_0 and submodule_1 in complementary mode. I want to run a servo motor using PWM. The servo uses a 50Hz signal i.e. 20ms. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, anyone can help me where the modification is required for the same?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using imxrt 1176.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 01:14:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/PWM-output-error-using-IMXRT-SDK/m-p/1465861#M19823</guid>
      <dc:creator>Devaharsha</dc:creator>
      <dc:date>2022-05-30T01:14:12Z</dc:date>
    </item>
  </channel>
</rss>

