Marco Cettina Posted April 3 Posted April 3 (edited) Hello! PWM seems to work without any configuration on the factory images with the gpio command, but I cant seem to get it to work on armbian. There doesn't seem to be any dtbs related to pwm, and /sys/class/pwm is empty on armbian. Anyone got this to work? EDIT: Forgot to add, doesnt seem to be any pwm overlays present on armbian install Edited April 4 by Marco Cettina 0 Quote
Werner Posted April 4 Posted April 4 Check if there are pwm overlays available in /boot/dtb/allwinner/overlay. If so try enable via armbian-config or manually with overlays= in /boot/armbianEnv.txt 0 Quote
Marco Cettina Posted April 4 Author Posted April 4 Whoops forgot to add that, there are no pwm related overlays on armbian install. 0 Quote
Werner Posted April 4 Posted April 4 Sometimes armbian-config is unreliable when adding overlays, therefore I suggested to check manually as well. 0 Quote
Marco Cettina Posted April 4 Author Posted April 4 (edited) The only two dtbs that mention PWM have a different prefix so i assume thats why they dont work when i try to enable them? sun50i-h5-pwn.dtbo and sun50i-h6-pwn.dtbo Edited April 4 by Marco Cettina 0 Quote
going Posted April 5 Posted April 5 On 4/3/2025 at 8:58 PM, Marco Cettina said: doesnt seem to be any pwm overlays present Expand Which pin requires an overlay? Which core are you using? 0 Quote
Marco Cettina Posted April 5 Author Posted April 5 (edited) So Im not entirely sure if I need to figure out the overlays or something else. On the factory debian image there are two overlays pwm12 and pwm34, i didnt enable them and it seems to work just fine with the gpio command. I should have been more specific, on armbian there are two pwm overlays but they have the prefix of sun50i-h5 and sun50i-h6, i tried enabling them anyway but didnt make a difference and still no pwmchip showing up in /sys/class/pwm. It also is giving me "val pwmWrite 0 <= X <= 1024, Or you can set new range by yourself by pwmSetRange(range)" when i set the pwm value even though I already did set a range and ram the same commands that worked perfectly on the factory image. Im not sure exactly what you mean by core. Edited April 5 by Marco Cettina 0 Quote
going Posted April 5 Posted April 5 On 4/5/2025 at 4:03 PM, Marco Cettina said: Im not sure exactly what you mean by core. Expand uname -r command. Two types of PWM can be available. Software and hardware. The hardware for h616-h618 processors is only available for these pins: PG19 - pwm1 PH0 - pwm3 PH1 - pwm4 PH2 - pwm2 PH3 - pwm1 PI11 - pwm1 PI12 - pwm2 PI13 - pwm3 PI14 - pwm4 Which pin do you want to use PWM for? 0 Quote
Marco Cettina Posted April 5 Author Posted April 5 uname -r: 6.6.75-current-sunxi64 I am wired to PH3 right now, that's what i have been testing with and was functional in hardware mode on the factory supplied Debian image. 0 Quote
going Posted April 6 Posted April 6 On 4/5/2025 at 9:33 PM, Marco Cettina said: uname -r: 6.6.75-current-sunxi64 Expand This is an outdated core and will no longer be supported after this pull request. Try switching to the EDGE core (6.13). I will add the ability to apply overlays for PWM to the EDGE core. And we will check it together. 0 Quote
Marco Cettina Posted April 6 Author Posted April 6 Ill do that and get back to you! Thank you! 0 Quote
Marco Cettina Posted April 6 Author Posted April 6 Alright im updated to 6.13.7-edge-sunxi64. 0 Quote
Marco Cettina Posted Monday at 02:36 AM Author Posted Monday at 02:36 AM So do you need to push an update to the EDGE build to allow PWM? 0 Quote
going Posted Monday at 06:57 PM Posted Monday at 06:57 PM On 4/7/2025 at 2:36 AM, Marco Cettina said: So do you need to push an update to the EDGE build to allow PWM? Expand The pwm driver is present there. It is necessary to add the overlay correctly. Is your device an orange-pi-zero-3? 0 Quote
Marco Cettina Posted Monday at 08:00 PM Author Posted Monday at 08:00 PM Got it, Yes that is correct. 0 Quote
Marco Cettina Posted Friday at 01:53 PM Author Posted Friday at 01:53 PM Hey any update on this? No rush, just checking in. Not sure what has to be done on your end. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.