<?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 Square wave output with variable frequency, FTM in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943110#M5093</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need some help to set up one FTM Ch to be able to output constant 50% DC PWM, with at run time variable frequency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target; 1Hz - 500Hz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using SDK, S32K144.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/ Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jun 2019 17:15:19 GMT</pubDate>
    <dc:creator>christofferjärl</dc:creator>
    <dc:date>2019-06-19T17:15:19Z</dc:date>
    <item>
      <title>Square wave output with variable frequency, FTM</title>
      <link>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943110#M5093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need some help to set up one FTM Ch to be able to output constant 50% DC PWM, with at run time variable frequency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target; 1Hz - 500Hz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using SDK, S32K144.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/ Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2019 17:15:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943110#M5093</guid>
      <dc:creator>christofferjärl</dc:creator>
      <dc:date>2019-06-19T17:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Square wave output with variable frequency, FTM</title>
      <link>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943111#M5094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris J&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is already an example that can do this in the SDK that comes with the S32DS, you can find it as ftm_pwm_s32k144. Please check it and don't hesitate to tell me if you have any question about it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:42:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943111#M5094</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2019-06-24T17:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Square wave output with variable frequency, FTM</title>
      <link>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943112#M5095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked into this example and as far as i can see it is set up to&lt;/P&gt;&lt;UL style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;LI&gt;increment or decrement duty cycle&lt;/LI&gt;&lt;LI&gt;Update channel duty cycle&lt;/LI&gt;&lt;LI&gt;Wait for a number of cycles to make the change visible&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to use the&amp;nbsp;FTM_DRV_UpdatePwmPeriod() function to just change the period/frequency and keep the DC at 50%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I seeing some trouble to keep a clean 50%DC while changing period. I think I have some kind of timer sync problem..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2019 18:03:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943112#M5095</guid>
      <dc:creator>christofferjärl</dc:creator>
      <dc:date>2019-06-24T18:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Square wave output with variable frequency, FTM</title>
      <link>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943113#M5096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris J&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to update the Duty cycle too, because it has to be recalculated with every change in the period, so you need something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;FTM_DRV_UpdatePwmPeriod&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_FLEXTIMER_PWM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FTM_PWM_UPDATE_IN_TICKS&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; new_period&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;FTM_DRV_UpdatePwmChannel&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_FLEXTIMER_PWM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0U&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FTM_PWM_UPDATE_IN_DUTY_CYCLE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x4000U&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0U&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2019 21:19:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Square-wave-output-with-variable-frequency-FTM/m-p/943113#M5096</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2019-06-25T21:19:49Z</dc:date>
    </item>
  </channel>
</rss>

