Marco Cettina Posted Thursday at 08:58 PM Posted Thursday at 08:58 PM (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 Friday at 03:35 AM by Marco Cettina 0 Quote
Werner Posted Friday at 03:29 AM Posted Friday at 03:29 AM 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 Friday at 03:36 AM Author Posted Friday at 03:36 AM Whoops forgot to add that, there are no pwm related overlays on armbian install. 0 Quote
Werner Posted Friday at 12:30 PM Posted Friday at 12:30 PM Sometimes armbian-config is unreliable when adding overlays, therefore I suggested to check manually as well. 0 Quote
Marco Cettina Posted Friday at 04:04 PM Author Posted Friday at 04:04 PM (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 Friday at 05:21 PM by Marco Cettina 0 Quote
going Posted Saturday at 12:45 PM Posted Saturday at 12:45 PM 03.04.2025 в 23:58, Marco Cettina сказал: doesnt seem to be any pwm overlays present Which pin requires an overlay? Which core are you using? 0 Quote
Marco Cettina Posted Saturday at 04:03 PM Author Posted Saturday at 04:03 PM (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 Saturday at 04:41 PM by Marco Cettina 0 Quote
going Posted Saturday at 05:09 PM Posted Saturday at 05:09 PM 51 минуту назад, Marco Cettina сказал: Im not sure exactly what you mean by core. 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 Saturday at 09:33 PM Author Posted Saturday at 09:33 PM 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 yesterday at 05:17 PM Posted yesterday at 05:17 PM 19 часов назад, Marco Cettina сказал: uname -r: 6.6.75-current-sunxi64 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 yesterday at 06:37 PM Author Posted yesterday at 06:37 PM Ill do that and get back to you! Thank you! 0 Quote
Marco Cettina Posted yesterday at 07:32 PM Author Posted yesterday at 07:32 PM Alright im updated to 6.13.7-edge-sunxi64. 0 Quote
Marco Cettina Posted 18 hours ago Author Posted 18 hours ago So do you need to push an update to the EDGE build to allow PWM? 0 Quote
going Posted 1 hour ago Posted 1 hour ago 16 часов назад, Marco Cettina сказал: So do you need to push an update to the EDGE build to allow PWM? 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 36 minutes ago Author Posted 36 minutes ago Got it, Yes that is correct. 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.