diff --git a/chip/mchp/pwm.c b/chip/mchp/pwm.c index 3cd95f3f3c..a94cb5359a 100644 --- a/chip/mchp/pwm.c +++ b/chip/mchp/pwm.c @@ -101,8 +101,10 @@ static uint32_t pwm_get_bb_sleep_mask(int id) { uint32_t bitpos = 32; - if (id >= MCHP_PWM_ID_MAX && id < MCHP_PWM_ID_MAX) + if (id >= MCHP_PWM_ID_MAX && + id < (MCHP_PWM_ID_MAX + MCHP_BBLEN_INSTANCES)) bitpos = (uint32_t)pwm_slp_bitpos[id]; + return (1ul << bitpos); }