ec: support sub-percent PWM precision |
||||||||||||||
Issue descriptionThere is a feature request to support sub-percent PWM precision (see http://crosbug.com/p/52005). It will involve the following: - Change pwm_set_duty() / pwm_get_duty() and chip level functions to support the new precision. - Verify chip-level PWM code can support the new precision (we might need to change pre-scalers / dividers for some chips). - Change or rev. console command and host command structs to support the new precision. Even if we don't add support for this right away, we can make sure our new host command interfaces are future-proof.
,
Aug 29 2016
,
Sep 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/26c5a22125916a53b62ac8226eb10af4c7a77c58 commit 26c5a22125916a53b62ac8226eb10af4c7a77c58 Author: Sam Hurst <shurst@google.com> Date: Tue Aug 23 18:43:23 2016 pwm: Increse PWM duty resolution to 16bits The current PWM interface allows for a pwm duty setting ranging from 0 to 100, resulting in a very coarse adjustment. To alleviate the problem, the interface now allows for a pwm duty setting in the range of 0 to 65535. BUG= chromium:615109 BRANCH=None TEST=Manual on chell. `ectool pwmsetduty 1 65535` - Verify LCD backlight goes to 100% `ectool pwmgetduty 1` - Prints 65535 `ectool pwmsetduty 1 0` - Verify LCD backlight goes to 0% `ectool pwmgetduty 1` - Prints 0 terminal pwmduty tests: >pwmduty PWM channels: 0: 100% 1: 62% 2: 100% 3: 80% > pwmduty 1 50 Setting channel 1 to 50% 1: 50% > pwmduty 1 0 Setting channel 1 to 0% 1: disabled > pwmduty 1 100 Setting channel 1 to 100% 1: 100% > pwmduty 1 raw 0 Setting channel 1 to raw 0% 1: disabled > pwmduty 1 raw 65535 Setting channel 1 to raw 65535% 1: 65535 > pwmduty PWM channels: 0: 100% 1: 100% 2: 100% 3: 80% > pwmduty 1 raw 30000 Setting channel 1 to raw 30000% 1: 30000 > pwmduty PWM channels: 0: 100% 1: 46% 2: 100% 3: 80% Change-Id: I299b77585f3988e72d9ac918bdde7dc5fa3df6de Reviewed-on: https://chromium-review.googlesource.com/374481 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Shawn N <shawnn@chromium.org> [modify] https://crrev.com/26c5a22125916a53b62ac8226eb10af4c7a77c58/board/kevin/board.c [modify] https://crrev.com/26c5a22125916a53b62ac8226eb10af4c7a77c58/include/pwm.h [modify] https://crrev.com/26c5a22125916a53b62ac8226eb10af4c7a77c58/common/pwm.c [modify] https://crrev.com/26c5a22125916a53b62ac8226eb10af4c7a77c58/chip/npcx/pwm.c
,
Sep 6 2016
Fixed?
,
Sep 6 2016
Yup, fixed in above CL. Thanks Sam!
,
Sep 6 2016
Well, I'm actually testing now and seeing a problem at max duty (65535). Kevin backlight goes off when I do this. Should I file a new bug or reopen?
,
Sep 6 2016
Thanks for testing, we'll check that case.
,
Sep 6 2016
I have confirmed the issue and I have a fix. File a new bug.
,
Sep 6 2016
Filed: https://code.google.com/p/chrome-os-partner/issues/detail?id=57052 Let's close this one then :)
,
Oct 7 2016
,
Nov 19 2016
,
Jan 21 2017
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Oct 14 2017
|
||||||||||||||
►
Sign in to add a comment |
||||||||||||||
Comment 1 by bugdroid1@chromium.org
, May 28 2016