<?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 Frequency in OPWFMB mode in S32K</title>
    <link>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1862501#M35163</link>
    <description>Hello kiran,&lt;BR /&gt;well, we are working for generating PWM pulses with variable period and variable duty cycle with OPWFMB in S32K3and S32DS. Since we can be able to generate pulses with this mode, but the period and duty cycle is not varying.&lt;BR /&gt;&lt;BR /&gt;can you help me with OPWFMB mode?</description>
    <pubDate>Thu, 09 May 2024 12:06:07 GMT</pubDate>
    <dc:creator>ESAKKI_MBD</dc:creator>
    <dc:date>2024-05-09T12:06:07Z</dc:date>
    <item>
      <title>PWM Frequency in OPWFMB mode</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1639943#M22374</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using S32K358 board and have configured 4 PWM Output Channel in OPWFMB mode with the same clock pre-scaler and configurable Period (Variable Period) for all the PWM output channels using EB tresos&amp;nbsp; listed below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;EMIOS_0_CH_3 = MSCR 130 = GPIO 130 = PTE2&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;EMIOS_0_CH_1 = MSCR 45 = GPIO 45 = PTB13&amp;nbsp;&lt;BR /&gt;&amp;nbsp;EMIOS_0_CH_4 = MSCR 48 = GPIO 48 = PTB16&amp;nbsp;&lt;BR /&gt;&amp;nbsp;EMIOS_0_CH_2 = MSCR 46 = GPIO 46 = PTB14&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;S&lt;/SPAN&gt;&lt;SPAN&gt;aw the below formula from one of the queries&amp;nbsp;raised in community,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PWM frequency = CORE_CLK / global pre-scaler / internal pre-scaler / (B1+1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;&lt;STRONG&gt;B1 is a value written to channel B register.&lt;/STRONG&gt;"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But as per this calculation, I was not getting the output frequency and is mismatching with the actual generated signal (verified its frequency through oscilloscope).&lt;/P&gt;&lt;P&gt;Below are the values that I set in PWM module:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CORE_CLK = 240MHz | OPWFMB Mode |&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Global Pre-scaler: 44 (Clock Divider value set in MCL module - EMIOS0_CH23)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Internal Pre-scaler (Clock prescaler): 2&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kiran_Gowda_6-1682441177152.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220806i9CCFDB43F3D0D70C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kiran_Gowda_6-1682441177152.png" alt="Kiran_Gowda_6-1682441177152.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kiran_Gowda_7-1682441223765.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220807i7F67202F497B0E8C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kiran_Gowda_7-1682441223765.png" alt="Kiran_Gowda_7-1682441223765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kiran_Gowda_8-1682441279699.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220808i26F67ECAD1FE0665/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kiran_Gowda_8-1682441279699.png" alt="Kiran_Gowda_8-1682441279699.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kiran_Gowda_9-1682441293951.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220809i1D9C31FF946FF9A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kiran_Gowda_9-1682441293951.png" alt="Kiran_Gowda_9-1682441293951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kiran_Gowda_10-1682441327406.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220810iBFFBB78CFB6065D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kiran_Gowda_10-1682441327406.png" alt="Kiran_Gowda_10-1682441327406.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As per the formula, I got&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;340.8664Hz&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;(240MHz/ (44*2*(8000+1)), but what I got from the oscilloscope was having&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;3.67kHz&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;for 50% duty cycle. (Reg-A value:&amp;nbsp;4000h &amp;amp; Reg-B value:&amp;nbsp;8000h).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly help me to understand, how the PWM frequency being calculated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank&amp;nbsp;&lt;/SPAN&gt;you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 08:46:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1639943#M22374</guid>
      <dc:creator>Kiran_Gowda</dc:creator>
      <dc:date>2023-04-26T08:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Frequency in OPWFMB mode</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1642002#M22476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;The formula you found in the post is correct. What I can infer from your configuration is that the &lt;EM&gt;Prescaler Clock Source&lt;/EM&gt; (UCPRECLK) should be set to EMIOS_PWM_IP_PS_SRC_PRESCALED_CLOCK so that the eMIOS channel clock is CORE_CLK divided by the &lt;EM&gt;Global Prescaler&lt;/EM&gt; (GPRE).&lt;/P&gt;
&lt;P&gt;Hope it helps you.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 06:04:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1642002#M22476</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2023-04-28T06:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Frequency in OPWFMB mode</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1642371#M22497</link>
      <description>&lt;P&gt;Hi, It worked after configuring the&amp;nbsp;&lt;EM&gt;Prescaler Clock Source&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;(UCPRECLK) to EMIOS_PWM_IP_PS_SRC_PRESCALED_CLOCK .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 16:17:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1642371#M22497</guid>
      <dc:creator>Kiran_Gowda</dc:creator>
      <dc:date>2023-04-28T16:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: PWM Frequency in OPWFMB mode</title>
      <link>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1862501#M35163</link>
      <description>Hello kiran,&lt;BR /&gt;well, we are working for generating PWM pulses with variable period and variable duty cycle with OPWFMB in S32K3and S32DS. Since we can be able to generate pulses with this mode, but the period and duty cycle is not varying.&lt;BR /&gt;&lt;BR /&gt;can you help me with OPWFMB mode?</description>
      <pubDate>Thu, 09 May 2024 12:06:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-Frequency-in-OPWFMB-mode/m-p/1862501#M35163</guid>
      <dc:creator>ESAKKI_MBD</dc:creator>
      <dc:date>2024-05-09T12:06:07Z</dc:date>
    </item>
  </channel>
</rss>

