I’m using sysfs to control my rpi5’s pwm andI’m having an issue where only one of my pwm pins is outputting a value (The pin that is working is gpio 18/physical pin 12/pwm2). In the pinout.xyz page, it shows that physical pins 12/32/33/35 have built in hardware PWM. (Correct me if I’m wrong). I set up a circuit with 4 LEDs connected to physical pins 12, 32, 33 and 35, then I outputted values from all 4 pwm pins in the sysfs. Here are the commands I used:
Cd /sys/class/pwm/pwmchip2
Echo 0 > export
Cd pwm0
Echo 2000000 > period
Echo 1000000 > duty_cycle
Echo 1 > enable
I then did this with all the 3 pwm pins that weren't previously working by changing the export values but it wasn't for any of them.
I will add that I have already set up the pwm via config.txt, by adding in dtoverlay=pwm, but I’ve had this grudge where that might only be setting up the default pin (gpio 18/physical pin 12/pwm2) and therefore that is the only one that is working. I’ve found this resource which has information about the config.txt modules here: and this resource shows that I can use dtoverlay=pwm<pin>=<pinvalue> to set up an individual pin. But even when I did this, nothing changed.
I’m happy to provide more information about my specific circumstance if necessary, please ask and I will reply as soon as I can.
Do you guys have any idea on why the pins of 35,33 and 32 aren’t set up correctly or just malfunctioning?
