Hi, I am trying to access a specific channel, channel 5 of the PWM1 output from flex_timer_1 on the S32G274. I am not sure what values to use on the command line or settings in the dts file in order to obtain an output?
In my dts file, I have the following:
myboard.dts
&pwm1 {
pinctrl-names = "default";
pinctrl-0 = <&pwm1_out_pins>;
status = "okay";
};
&pinctrl {
pwm1_out_pins: pwm1_out_pins {
pwm1_out_grp {
pinmux = <S32CC_PINMUX(80, FUNC3)>;
output-low;
output-enable;
slew-rate = <S32_COMPAT_SLEW_83MHZ>; // Is this needed?
};
};
};
Then, when I run the following commands on the Linux command line:
echo 1 > /sys/class/pwm/pwmchip0/export
echo 10000000 > /sys/class/pwm/pwmchip0/pwm1/period
echo 5000000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
echo 'normal' > /sys/class/pwm/pwmchip0/pwm1/polarity
echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable
I don't receive any errors, but I do not see an output on PF_00, pin for PWM1, channel 5. I'm not sure if the /sys/class/pwm/pwmchip0/export file controls the output channel? I did try
echo 4 > /sys/class/pwm/pwmchip0/export
but received an error.
Is there something I need to add in the dts file in order to access channel 5 of flex_timer_1 for PWM1? Or is there a command I need to execute on the command line to provide the PWM output?
Thanks for any assistance.