Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A20 PWM problem pins "HIGH" on boot

Featured Replies

Hello dear mates, first I want to thank zador.blood.stained for helping out with recompiling the DTB for A20 so we can enable PWM on Armbian.

 

Link to his post :https://forum.armbian.com/index.php/topic/1817-using-pwm-without-rebuilding-kernel/

 

Now I'm seeking your help with this problem, after I added this code to the A20.dts file (I'm on a PCduino3 nano) 

&pwm {
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>;
	status = "okay";
};

I'm able to compile the .dtb file, and after booting I can see the pwmchip0 on /sys/class/pwm. I can change the values for Polarity, Period, Duty_Cycle, Enable. 

The problem is, when I boot the PCduino, PWM0 and PWM1 Pins are Output High, I mean, if I connect a led to those pins they will turn on. Moreover, if I change the Period and then enable the pwm pin, even with "duty_cycle" as "0" it will keep being "HIGH", to make a normal use of any of this PWM pins, I need to set the polarity to "inverse" and then return to "normal", when doing this, PWM will go "LOW" because of the "0 = Duty_Cycle" and then proceed to works as a PWM will normally work, does anybody knows how to fix this? would be a great help, i've spent more than a day figuring out how to resolve this, but no luck. Thanks for your help and time.

 

 

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.