[MinnowBoard] PWM problem

Oshrat, Yinon yinon.oshrat at intel.com
Mon Jul 6 12:13:02 UTC 2015


'what bios/kernel version are you using?
No matter what value I use as period, it always stays 1.3 ms

-----Original Message-----
From: elinux-MinnowBoard [mailto:elinux-minnowboard-bounces at lists.elinux.org] On Behalf Of Markus Maier
Sent: Monday, July 6, 2015 12:03 PM
To: elinux-minnowboard at lists.elinux.org
Subject: Re: [MinnowBoard] PWM problem

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
_______________________________________________
elinux-MinnowBoard mailing list
elinux-MinnowBoard at lists.elinux.org
http://lists.elinux.org/mailman/listinfo/elinux-minnowboard
---------------------------------------------------------------------
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.


More information about the elinux-MinnowBoard mailing list