Cannot Increase PWM Period

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Cannot Increase PWM Period

781件の閲覧回数
Tony-FM-Eng
Contributor II

Hi,

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:
 
sh: write[ 1517.050368] fsl-ftm-pwm 402e4000.pwm: failed to calculate new period
 
I was following this example:
Enabling the pwm (FTM1_CH1, channel start from 0)
# echo 1 > /sys/class/pwm/pwmchip0/export
Configuring the pwm period, duty cycle, and polarity
# echo 1000000000 > /sys/class/pwm/pwmchip0/pwm1/period  (1000000000 nanoseconds as period, 1 s)
# echo 500000000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle (50% duty cycle, 0.5 s)
# echo 'normal' > /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 > /sys/class/pwm/pwmchip0/pwm0/enable
on NXP's website from the LLDPUG_RevL6.1.1-1.0.0: Layerscape Linux Distribution POC User Guide, 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?
 
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?
 
Also note that there is no mention in the S32G2 Linux BSP 39.0 manual regarding the PWM.
 
Thanks for the any assistance.
1 返信

694件の閲覧回数
chenyin_h
NXP Employee
NXP Employee

Hello, @Tony-FM-Eng 

Sorry for the delay.

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.

Apologize for your inconvenience.

 

BR

Chenyin

0 件の賞賛
返信