Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4477

Advanced users • Rasperry Pi 5 - Hardware PWM not working anymore after upgrading from Kernel 6.1.0 to 6.6.20?

$
0
0
Hey there,

I have a really strange issue... I am using a Raspberry Pi 5 with the Rapsberry PI Lite OS (the latest image from December 2023). So far everything was working fine with the hardware PWM and I could use it for a servo motor just fine.

Yesterday I did an apt update & apt full-upgrade and it updated my Kernel from 6.1.0 to 6.6.20 ! I have seen that this is the new LTS Kernel now... well everything went fine, but I am not able to access the PWM anymore after this update.

My PWM on GPIO12 has a very simple setup... in boot config.txt the PWM is configured as: dtoverlay=pwm,pin12,func=4

This has always worked fine (also as soon as I revert back to 6.1.0 everything starts working again).

So when I try:

echo 0 > /sys/class/pwm/pwmchip2/export (that works fine!)

and then for example set period to 330ms

echo 330000000 > /sys/class/pwm/pwmchip2/pwm0/period

this gives write error: Invalid argument and when looking in kernel log: kernel: rpi-pwm 1f00098000.pwm: failed to get clock rate

So something seems to have changed between 6.1.0 and 6.6.20 that the PWM is not working any more, but I have no idea how to fix that? I read that there is now a max of 50 Mhz and I also tried several numbers but it always gives this error?

Is anyone aware of this and has a idea on what to do?

Thanks for your help,
Oliver

Statistics: Posted by Ody — Tue Mar 12, 2024 9:34 pm — Replies 1 — Views 39



Viewing all articles
Browse latest Browse all 4477

Trending Articles