<?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>S32GのトピックCannot Increase PWM Period</title>
    <link>https://community.nxp.com/t5/S32G/Cannot-Increase-PWM-Period/m-p/1909988#M8745</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;DIV&gt;I am trying to increase the PWM1 period on the S32G to 1 second for a single output channel. With the current Linux driver "fsl-ftm-pwm," it seems the maximum PWM period is 100 mS. When I try to increase the period beyond 100 mS, I receive the following error message:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;sh: write[ 1517.050368] fsl-ftm-pwm 402e4000.pwm: failed to calculate new period&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I was following this example:&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;Enabling the pwm (FTM1_CH1, channel start from 0)
# echo 1 &amp;gt; /sys/class/pwm/pwmchip0/export
Configuring the pwm period, duty cycle, and polarity
# echo 1000000000 &amp;gt; /sys/class/pwm/pwmchip0/pwm1/period  (1000000000 nanoseconds as period, 1 s)
# echo 500000000 &amp;gt; /sys/class/pwm/pwmchip0/pwm1/duty_cycle (50% duty cycle, 0.5 s)
# echo 'normal' &amp;gt; /sys/class/pwm/pwmchip0/pwm1/polarity (whether the 'on' time of the signal is active high or active low. Set the polarity to active high.)
Enable pwm
# echo 1 &amp;gt; /sys/class/pwm/pwmchip0/pwm0/enable&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;on NXP's website from the &lt;EM&gt;LLDPUG_RevL6.1.1-1.0.0: Layerscape Linux Distribution POC User Guide&lt;/EM&gt;&lt;/SPAN&gt;, which shows support for a 1 second PWM period. I believe this is close to the same driver for the S32G, so I would assume that the driver should support an output of a 1 second (1000000000 nS) PWM period? Although, it seems the current S32G PWM driver does not?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So, I'm not sure if the clocks need to change in the DTS file, or if there is a way to set the prescaler in the driver file to obtain an increased PWM period?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Also note that there is no mention in the S32G2 Linux BSP 39.0 manual regarding the PWM.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for the any assistance.&lt;/DIV&gt;</description>
    <pubDate>Tue, 16 Jul 2024 18:54:08 GMT</pubDate>
    <dc:creator>Tony-FM-Eng</dc:creator>
    <dc:date>2024-07-16T18:54:08Z</dc:date>
    <item>
      <title>Cannot Increase PWM Period</title>
      <link>https://community.nxp.com/t5/S32G/Cannot-Increase-PWM-Period/m-p/1909988#M8745</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;DIV&gt;I am trying to increase the PWM1 period on the S32G to 1 second for a single output channel. With the current Linux driver "fsl-ftm-pwm," it seems the maximum PWM period is 100 mS. When I try to increase the period beyond 100 mS, I receive the following error message:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;sh: write[ 1517.050368] fsl-ftm-pwm 402e4000.pwm: failed to calculate new period&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I was following this example:&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;Enabling the pwm (FTM1_CH1, channel start from 0)
# echo 1 &amp;gt; /sys/class/pwm/pwmchip0/export
Configuring the pwm period, duty cycle, and polarity
# echo 1000000000 &amp;gt; /sys/class/pwm/pwmchip0/pwm1/period  (1000000000 nanoseconds as period, 1 s)
# echo 500000000 &amp;gt; /sys/class/pwm/pwmchip0/pwm1/duty_cycle (50% duty cycle, 0.5 s)
# echo 'normal' &amp;gt; /sys/class/pwm/pwmchip0/pwm1/polarity (whether the 'on' time of the signal is active high or active low. Set the polarity to active high.)
Enable pwm
# echo 1 &amp;gt; /sys/class/pwm/pwmchip0/pwm0/enable&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;on NXP's website from the &lt;EM&gt;LLDPUG_RevL6.1.1-1.0.0: Layerscape Linux Distribution POC User Guide&lt;/EM&gt;&lt;/SPAN&gt;, which shows support for a 1 second PWM period. I believe this is close to the same driver for the S32G, so I would assume that the driver should support an output of a 1 second (1000000000 nS) PWM period? Although, it seems the current S32G PWM driver does not?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So, I'm not sure if the clocks need to change in the DTS file, or if there is a way to set the prescaler in the driver file to obtain an increased PWM period?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Also note that there is no mention in the S32G2 Linux BSP 39.0 manual regarding the PWM.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for the any assistance.&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Jul 2024 18:54:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/Cannot-Increase-PWM-Period/m-p/1909988#M8745</guid>
      <dc:creator>Tony-FM-Eng</dc:creator>
      <dc:date>2024-07-16T18:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Increase PWM Period</title>
      <link>https://community.nxp.com/t5/S32G/Cannot-Increase-PWM-Period/m-p/1913748#M9057</link>
      <description>&lt;P&gt;Hello, &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/234102"&gt;@Tony-FM-Eng&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the delay.&lt;/P&gt;
&lt;P&gt;As far as I know, the Layerscape and S32G do not share the same development tree, since the feature is not mentioned in the BSP UM, the specific value may not be directly supported.&lt;/P&gt;
&lt;P&gt;Apologize for your inconvenience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Chenyin&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 07:00:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/Cannot-Increase-PWM-Period/m-p/1913748#M9057</guid>
      <dc:creator>chenyin_h</dc:creator>
      <dc:date>2024-07-22T07:00:53Z</dc:date>
    </item>
  </channel>
</rss>

