ITE drivers/pwm: fix target frequency below 324Hz on it8xxx2
after the second times will not operating in correct output frequency. Signed-off-by: Richard Yim <yimjiajun@icloud.com>
This commit is contained in:
parent
504feb77c4
commit
1b4e5b8d35
1 changed files with 5 additions and 2 deletions
|
@ -141,8 +141,11 @@ static int pwm_it8xxx2_set_cycles(const struct device *dev,
|
|||
* <=324Hz in board dts. Now change prescaler clock source from 8MHz to
|
||||
* 32.768KHz to support pwm output in mode.
|
||||
*/
|
||||
if ((target_freq <= 324) && (inst->PCFSR & BIT(prs_sel))) {
|
||||
inst->PCFSR &= ~BIT(prs_sel);
|
||||
if (target_freq <= 324) {
|
||||
if (inst->PCFSR & BIT(prs_sel)) {
|
||||
inst->PCFSR &= ~BIT(prs_sel);
|
||||
}
|
||||
|
||||
pwm_clk_src = (uint64_t) 32768;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue