-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No PWM on a raspberry pi 5 #141
Comments
Hey @whattheflukz. Unfortunately I don't have a Pi 5 available for testing, so I can't run your code myself. I do have a few suggestions you could try to pinpoint the cause of the issue though. Besides running a minimal synchronous version of the code and seeing if that works, and making sure PWM is enabled in If you have some time to check, grab a copy of the RPPAL repo, and in the |
Hello @golemparts ! |
Thanks for trying |
Hi again @golemparts |
I also just tried doing the exact same setup on a raspberry pi 4, running the example code verbatim as well, and that works as expected so it's definitely a problem specific to the pi 5 (Rather than me just doing something stupid haha). I imagine because of the hardware differences with the new RP1 chip. |
Thanks for the additional checks. Yeah, it definitely sounds like an RP1 specific issue. I'll have a Pi 5 coming in soon so I can figure out what's going on. |
Hello Im experiencing the same issue, anyone figured out any workaround to get pwm for rpi5 to work? |
If youre willing to use python when I was messing with this the software pwm from some python libs seemed to work ok |
I finally have a Pi 5 available for testing, so I should be able to dive into this as soon as I get a chance. RPPAL also has a software PWM available if you're going with @whattheflukz 's alternative suggestion. Worth a shot until this is resolved. |
I did some testing today. GPIO18 on the Pi 5 is tied to pwmchip2/pwm2, while RPPAL is hardcoded to use pwmchip0 with pwm0/pwm1 on all Pi models. I assume this change is related to the RP1 now handling the hardware PWM channels. I'll add an exception for Pi models that have an RP1 (and also check the other hardware PWM channels), after which everything should be working as expected. |
A fix has been implemented on the master branch. I've run some tests on both Pwm0 and Pwm1 on a Pi 4 and a Pi 5, and everything seems to be working. I'll schedule a 0.18.0 release for tonight or tomorrow, which will include the fix. |
Thanks so much for your effort! |
Fixed with release 0.18.0 |
using the following code i am unable to produce a pwm signal on a raspberry pi 5. See attached scope probe image
Its possible i'm just doing something wrong but this code compiles and runs just fine, and is basically pulled straight from the examples
The text was updated successfully, but these errors were encountered: