You can set the alt function in the dtoverlayyou could use the sysfs '/sys/class/pwm'
First you need to add the overlay into the config.txt (/boot/firmware/config.txt)After you need to set the pin12 to alternate function a0Code:
dtoverlay=pwm
Now the PWM should work!Code:
daniel@Pi4home:~ $ pinctrl 1212: ip pd | lo // GPIO12 = inputdaniel@Pi4home:~ $ pinctrl 12 a0daniel@Pi4home:~ $ pinctrl 1212: a0 pd | lo // GPIO12 = PWM0_0daniel@Pi4home:~ $
Code:
dtoverlay=pwm,pin=12,func=4
Statistics: Posted by rpdom — Tue Oct 08, 2024 8:50 pm