You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To add natively supported PWM, you'll first need to add pwmOuts to your Chip file such as:
pwmOuts = (
((0, 0), PWM1),
((1, 0), PWM2),
((2, 0), PWM3),
)
The first parameter is a tuple and consists of the PWM chip number and the PWM channel of that chip.
The second parameter is the PWM pin and can be found by either a web search or referring to the manufacturer data.
Board Name
microcontroller/rockchip
Steps
I've been looking into hardware PWM and found a few flaws.
Description
This is what the tutorial below says:
https://learn.adafruit.com/adding-a-single-board-computer-to-blinka/adding-more-features
But some chip definitions are not like that.
All PWM chip numbers and PWM channels are the same.
https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/rockchip/rk3399/pin.py#L225
https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/rockchip/rk3568/pin.py#L238
It is a list instead of a tuple.
https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/rockchip/rk3566/pin.py#L186
PWM chip number and the PWM channel may be reversed
https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/rockchip/rk3588/pin.py#L288
Additional information
I don't have these boards, so I can't check the exact contents.
The text was updated successfully, but these errors were encountered: