<?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 for MX2 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228329#M16631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent!!! :smileywink:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Dec 2013 17:52:09 GMT</pubDate>
    <dc:creator>jamesbone</dc:creator>
    <dc:date>2013-12-12T17:52:09Z</dc:date>
    <item>
      <title>PWM for MX2</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228325#M16627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to turn on the pwm0 channel in u-boot. I follow the following articles but with limited success. &lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/273292#273292"&gt;https://community.freescale.com/message/273292#273292&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having the same problem as Stefan here &lt;A _jive_internal="true" href="https://community.nxp.com/thread/295562"&gt;https://community.freescale.com/thread/295562&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically this is what I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Clear bit 29 to turn off the PWM_CLK24M_GATE. &lt;/P&gt;&lt;P&gt;2) Clear the last bit f the HW_PINCTRL_MUXSEL7 BANK3_PIN16 to drive PWM0.&lt;/P&gt;&lt;P&gt;3) Clear SFTRST and CLKGATE by clearing bits 31 and 30 of the HW_PWM_CTRL.&lt;/P&gt;&lt;P&gt;4) Enable PWM0 by setting bit 0 of the HW_PWM_CTRL.&lt;/P&gt;&lt;P&gt;5) Follow the example thread to sett the ACTIVE0 DC to 0x4B0 or 1200 tick, to make 50% DC. &lt;/P&gt;&lt;P&gt;6) Follow the example thread to sett the PERIOD0 to 0xB095E for 23999 or 1 period for the 24MHz clock. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Piezo hooked up the PWM0. Stefan seems to have the same issue. His post is old so I didn't if it is proper to resurrect it. Does anyone have the same problem? Does anyone know the proper sequence to do this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the values of the registers when running: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HW_CLKCTRL_XTAL:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1 &lt;/P&gt;&lt;P&gt;HW_PINCTRL_MUXSEL7: 0x3FFFFF3A &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;HW_PWM_CTRL:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x3FC00001 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ACTIVE0:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4B0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;PERIOD0:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xB095E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks, &lt;/P&gt;&lt;P&gt;Tai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 14:28:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228325#M16627</guid>
      <dc:creator>tainguyen</dc:creator>
      <dc:date>2013-11-26T14:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: PWM for MX2</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228326#M16628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lets try this order,&amp;nbsp; that it is just the same but we are doing first the&amp;nbsp; IOMUX&amp;nbsp; configuration and in your posting you are missing the&amp;nbsp; SET ENABLE of the PWM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;Clear the IOMUX pin&lt;/P&gt;&lt;P&gt;&amp;gt;Clear SFTRST&lt;/P&gt;&lt;P&gt;&amp;gt;Clear CLKGATE&lt;/P&gt;&lt;P&gt;&amp;gt;Clear ENABLE&lt;/P&gt;&lt;P&gt;&amp;gt;Program ACTIVE register&lt;/P&gt;&lt;P&gt;&amp;gt;Program PERIOD register&lt;/P&gt;&lt;P&gt;&amp;gt;Set ENABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using the EVK board?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2013 02:44:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228326#M16628</guid>
      <dc:creator>jamesbone</dc:creator>
      <dc:date>2013-12-05T02:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: PWM for MX2</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228327#M16629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just also notice that you are using the 24Mhz clock and unfortunately there is an ERRATA of the i.MX28&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/errata/IMX28CE.pdf?fsrch=1&amp;amp;sr=1" title="http://cache.freescale.com/files/32bit/doc/errata/IMX28CE.pdf?fsrch=1&amp;amp;sr=1"&gt;http://cache.freescale.com/files/32bit/doc/errata/IMX28CE.pdf?fsrch=1&amp;amp;sr=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="120.90239999999997" data-font-name="g_font_325_0" dir="ltr" style="font-size: 16px; font-family: sans-serif;"&gt;PWM: Register write sync issue when&amp;nbsp; HSADC clock frequency is&amp;nbsp; lower than APBX&amp;nbsp; clock frequency&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="120.90239999999997" data-font-name="g_font_325_0" dir="ltr" style="font-size: 16px; font-family: sans-serif;"&gt;&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="93.2288" data-font-name="g_font_325_0" dir="ltr" style="font-size: 16px; font-family: sans-serif;"&gt;Description:&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="305.7088000000001" data-font-name="g_font_338_0" dir="ltr" style="font-size: 16px; font-family: serif;"&gt;The PWM channel might not generate the required output signal when in HSADC driving mode. &lt;/P&gt;&lt;P data-angle="0" data-canvas-width="68.8448" data-font-name="g_font_338_0" dir="ltr" style="font-size: 16px; font-family: serif;"&gt;When in HSADC mode, if the HSADC input clock is much lower than the APBX bus clock (for&amp;nbsp; example APBX Bus clock is 24 MHz and HSADC input clock is 4 MHz) the write signal to the PWM registers is missed. Write access to the following registers has no effect after HSADC mode is enabled:&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="68.8448" data-font-name="g_font_338_0" dir="ltr" style="font-size: 16px; font-family: serif;"&gt;&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="237.35359999999994" data-font-name="g_font_338_0" dir="ltr" style="font-size: 16px; font-family: serif;"&gt;• PWM Control and Status Register&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="217.79840000000002" data-font-name="g_font_338_0" dir="ltr" style="font-size: 16px; font-family: serif;"&gt;• PWM Channel Active Register&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="98.9024" data-font-name="g_font_338_0" dir="ltr" style="font-size: 16px; font-family: serif;"&gt;• PWM Channel &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Period Register&lt;/LI&gt;&lt;/UL&gt;&lt;P data-angle="0" data-canvas-width="154.60000000000002" data-font-name="g_font_338_0" dir="ltr" style="font-size: 16px; font-family: serif;"&gt;As a result, dedicated PWM&amp;nbsp; channel is not triggered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2013 02:55:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228327#M16629</guid>
      <dc:creator>jamesbone</dc:creator>
      <dc:date>2013-12-05T02:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: PWM for MX2</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228328#M16630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James, &lt;/P&gt;&lt;P&gt;Sorry for the late response. I was on vacation. &lt;/P&gt;&lt;P&gt;Thank you for the information. I did get the pwm to work. Our piezo was connected to a different pin. Also, our piezo is low active, so I had to set the period and active value correspondingly. &lt;/P&gt;&lt;P&gt;Tai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 17:17:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228328#M16630</guid>
      <dc:creator>tainguyen</dc:creator>
      <dc:date>2013-12-09T17:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: PWM for MX2</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228329#M16631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent!!! :smileywink:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 17:52:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PWM-for-MX2/m-p/228329#M16631</guid>
      <dc:creator>jamesbone</dc:creator>
      <dc:date>2013-12-12T17:52:09Z</dc:date>
    </item>
  </channel>
</rss>

