Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

what's the scope for Echo 2000000?

一秋
Novice
1,326 Views

One question about Edison PWM setting: echo 2000000 > /sys/class/pwm/pwmchip0/pwm3/duty_cycle, what's the scope for Echo 2000000?

1 Solution
Carlos_M_Intel
Employee
133 Views

Hi Effy,

While using the duty_cycle as 2000000 you will have ~40.64%. In order to calculate the duty cycle you want to use and the number you have to put in

/sys/class/pwm/pwmchip0/pwmX/duty_cycle you need to know that 4950495 is 100%.

You can use the following equivalence:

duty_cycle =

DutyCycle * 4950495

100

Where duty_cycle is the value in /sys/class/pwm/pwmchip0/pwmX/duty_cycle and DutyCycle is the %Duty cycle you want to use. For example if you want to use 40% as DutyCycle you will have as result 1980198.

Regards,

Charlie

View solution in original post

2 Replies
Carlos_M_Intel
Employee
134 Views

Hi Effy,

While using the duty_cycle as 2000000 you will have ~40.64%. In order to calculate the duty cycle you want to use and the number you have to put in

/sys/class/pwm/pwmchip0/pwmX/duty_cycle you need to know that 4950495 is 100%.

You can use the following equivalence:

duty_cycle =

DutyCycle * 4950495

100

Where duty_cycle is the value in /sys/class/pwm/pwmchip0/pwmX/duty_cycle and DutyCycle is the %Duty cycle you want to use. For example if you want to use 40% as DutyCycle you will have as result 1980198.

Regards,

Charlie

一秋
Novice
133 Views

Hi Charlie,thanks very much!

Reply