[MinnowBoard] PWM problem

Markus Maier maier.m at web.de
Mon Jul 6 09:03:20 UTC 2015


Oshrat, Yinon <yinon.oshrat at ...> writes:

> 
> 
> 
> Hi,
> Sorry to bother the group, but maybe someone know how to use PWM, I have
the issue described below and couldn't find a solution.
>  
> Thanks
> Yinon
>  
> 
> 
> From: elinux-MinnowBoard [mailto:elinux-minnowboard-bounces <at>
lists.elinux.org]
> On Behalf Of Oshrat, YinonSent: Thursday, June 25, 2015 2:01 PMTo:
elinux-minnowboard-XmKyDsxDEzZ74goWV3ctuw at public.gmane.orgSubject:
[MinnowBoard] PWM problem
> 
> 
>  
> Hi,
> I try to use the PWM GPIOs of a Minnowboard MAX and encounter a problem.
> No matter what the value I write into
> /sys/class/pwm/pwmchip0/pwm0/period
> The output signal period is the same, about 1.3ms
> Did anyone encounterd this problem? Is there a way to fix that?
>  
> I use Ubuntu with kernel 3.19.0-15-generic
>  
> Thanks
> Yinon
>  
>  
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> 
> _______________________________________________
> elinux-MinnowBoard mailing list
> elinux-MinnowBoard at ...
> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard
> 


Hi Yinon,

I did something like

--------
# make PWM available
echo 0 > /sys/class/pwm/pwmchip0/export

# set period to 40µs
echo 40000 > /sys/class/pwm/pwmchip0/pwm0/period

# set the duty cycle
echo 20000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle

# enable the PWM
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
--------

Works for me...

Cheers
Markus


More information about the elinux-MinnowBoard mailing list