Community
cancel
Showing results for 
Search instead for 
Did you mean: 
一秋
Novice
1,259 Views

what's the scope for Echo 2000000?

Jump to solution

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
65 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
66 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

一秋
Novice
65 Views

Hi Charlie,thanks very much!

Reply