I am trying to use pwm on GPIO pin 40 but I have been unsuccessful so far.
I am using
pwm as device tree overlay in my config.txt
After that I tried performing the below actions
root@rpi3:/sys/class/pwm/pwmchip0# echo 0 > export
root@rpi3:/sys/class/pwm/pwmchip0# echo 1000000 > pwm0/period
root@rpi3:/sys/class/pwm/pwmchip0# echo 500000 > pwm0/duty_cycle
root@rpi3:/sys/class/pwm/pwmchip0# echo 1 > pwm0/enable
I tried doing the same thing on channel 1 but still nothing. (I have an Oscilloscope connected to the pwm line)
dtoverlay=pwm,pin=40,clock=1000000 and turned my audio off in config.txt
But I am still unable to see a pwm pulse. Why is that? The Documentation, states me to setup the clock before using it. So How do I setup my clock? Also Software PWM works via python code works. But that is not somethings that I want. Since that requires me to run a python script on an infinite loop.