From d1b4d55343907a8b0a41b8892f02301d51d033e1 Mon Sep 17 00:00:00 2001 From: pnb Date: Sun, 1 Nov 2015 14:40:43 +0100 Subject: [PATCH] pwm duty can by zero --- arch/arm/src/stm32/stm32_pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */