Part Number:AM4379
Tool/software: Linux
Hi,
We tried to debug the PWM function in our project base on AM4379 SDK V5.x.
I added the PWM node in DTS, and I could find the SYSFS interface '/sys/class/pwm/pwmchip0'.
I configured the device referring PWM user guide, and adjusted the duty cycle, but the voltage of corresponding pin was no change.
I checked the control mode register value, the PWM function was not enable.
DTS:
myecap2_pins_default: myecap2_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x19c, PIN_OUTPUT_PULLUP | MUX_MODE4) /* (M24) */
>;
};
&epwmss2 {
status = "okay";
ecap2: ecap@48304100 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&myecap2_pins_default>;
};
};
The pin M24 control mode regisger offset is 99Ch, check the value is as follow:
pinmux:
root@am437x-evm:/sys/class/pwm# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins
pin 103 (PIN103) 44e1099c 08040007 pinctrl-single
dmesg:
root@am437x-evm:/sys/class/pwm# dmesg |grep ecap
[ 0.198887] pinctrl-single 44e10800.pinmux: could not add functions for myecap2_pins_default 4294965660x
Please help us analysis this issue, thanks a lot.