Hello,

I thought I would ask this question here in case there is anyone who has used 
PWM for a similar thing on the RP2040.

Currently I am trying to control two servo motors, using PWM5 channels A & B on 
the RP2040. I have enabled the dual
channel support and changed the pins for these two channels to GPIO26 & 27. 
However, using the `pwm` example tool and my
own code with the PWM driver API, I can only get one of the two (GPIO27) to 
output a PWM signal.

I have configured the channel to a 250Hz frequency and I am using a duty cycle 
of 15% and 55% to open and close the
servos respectively. I have used the following commands to attempt to get 
things working:

- `pwm -f 250 -d 15 -d 15`
- `pwm -f 250 -d 55 -d 55`
- `pwm -f 250 -c 1 -d 15`
- `pwm -f 250 -c 1 -d 55`
- `pwm -f 250 -c 2 -d 15`
- `pwm -f 250 -c 2 -d 55`

However, no matter what, this only seems to result in a PWM output on GPIO27. 
Is there possibly some configuration
option I am missing, or am I using the pwm example wrong? I have enabled 2 
channels in both the System Type menu for the
RP2040 and in the PWM_MULTICHAN option, and confirmed that I've correct set the 
PWM 5 A & B channels to GPIO 26 and 27.

Best,

-- 
Matteo Golin

Attachment: signature.asc
Description: PGP signature

Reply via email to