diff --git a/arch/arm/src/stm32/stm32_pwm.c b/arch/arm/src/stm32/stm32_pwm.c index a3a1645688..a5cafce797 100644 --- a/arch/arm/src/stm32/stm32_pwm.c +++ b/arch/arm/src/stm32/stm32_pwm.c @@ -582,7 +582,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, pwmvdbg("TIM%d channel: %d frequency: %d duty: %08x\n", priv->timid, priv->channel, info->frequency, info->duty); #endif - DEBUGASSERT(info->frequency > 0 && info->duty > 0 && + DEBUGASSERT(info->frequency > 0 && info->duty >= 0 && info->duty < uitoub16(100)); /* Disable all interrupts and DMA requests, clear all pending status */