diff --git a/chip/npcx/pwm.c b/chip/npcx/pwm.c index 9d16687ddf..f344f1be6c 100644 --- a/chip/npcx/pwm.c +++ b/chip/npcx/pwm.c @@ -84,9 +84,9 @@ static void pwm_set_freq(enum pwm_channel ch, uint32_t freq) NPCX_PRSC(mdl) = (uint16_t)prescaler_divider; /* Set PWM cycle time */ - NPCX_CTR(mdl) = EC_PWM_MAX_DUTY - 1; + NPCX_CTR(mdl) = EC_PWM_MAX_DUTY; - /* Set the duty cycle to 0% since DCR > CTR */ + /* Set the duty cycle to 100% since DCR == CTR */ NPCX_DCR(mdl) = EC_PWM_MAX_DUTY; } diff --git a/common/pwm.c b/common/pwm.c index 761d1dad25..18651d8358 100644 --- a/common/pwm.c +++ b/common/pwm.c @@ -144,8 +144,7 @@ static int cc_pwm_duty(int argc, char **argv) /* Negative = disable */ pwm_enable(ch, 0); } else { - ccprintf("Setting channel %d to%s%d%%\n", - ch, (max_duty == 100) ? " " : " raw ", value); + ccprintf("Setting channel %d to %d\n", ch, value); pwm_enable(ch, 1); (max_duty == 100) ? pwm_set_duty(ch, value) : pwm_set_raw_duty(ch, value);