Jump to content

A20 PWM problem pins "HIGH" on boot


David Melara

Recommended Posts

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.

 

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines