Pwm0_m0 & pwm0_m1

Hi,

Is it possible to use both at the same time? I have both dtoverlays enabled

/dtbs/4.19.193-58-rockchip-gbac1feba87f0/rockchip/overlay/rk3568-pwm0-m1.dtbo
/dtbs/4.19.193-58-rockchip-gbac1feba87f0/rockchip/overlay/rk3568-pwm0-m0.dtbo

But it appears that I can only have one or the other in use at a time. I don’t appear to be able to control pwm on GPIO17/GPIO27 MRAA pins 11 & 13 at the same time?

Documentation for the 3A says
but only one PWM function can be used at a time currently .

But not sure if this applies to the CM3 as well?

Any help would be appreciated

Thanks

Adam

I’m quite sure, that not. You can thing of the X_mY as possible multiplexed output, i.e. the CPU allows you to route the function X to a set of GPIOs Y. So even if it would be possible, its “gain” is small, you placed the same GPIO function to two GPIO pins. The _mY multiplexers allows to to combine more “different” function together that would not be possible with the “pi standard layout”, at the price that different pins of your header are used (so it is not “standard” anymore).

Sorry let me be clear I do not what to mirror the PWM output from 1 pin to the other. I just need to be able to use mraa Pin 13 for controlling LED and mraa Pin 11 for another PWM requirement. But it seems that I can only use a single PWM channel full stop.

CM3 claims to have 9 Hardware PWM pins but may be limited by kernel or something?

You can use more than one PWM, but you cannot route it to every possible PIN in the header.

See https://wiki.radxa.com/Rock3/CM3/raspcm4io/gpio

You can for instance use PWM0 on Pin 11 or 13, and PWM1 on PIN 5, PWM2 on PIN3, …
Up to 7 PWM should be possible.

1 Like

Thank you, that make sense!