From aaa173dd371f77c92e189ea57f764d3d2f8f92a5 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Wed, 12 Jun 2019 13:22:21 +0000 Subject: [PATCH] Merged in raiden00/nuttx_pe (pull request #891) stm32/stm32_pwm.c, stm32h7/stm32_pwm.c: fix pulsecount for the number of counts greater than 128 Approved-by: Gregory Nutt --- arch/arm/src/stm32/stm32_pwm.c | 2 -- arch/arm/src/stm32h7/stm32_pwm.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/arch/arm/src/stm32/stm32_pwm.c b/arch/arm/src/stm32/stm32_pwm.c index 9d9a1abbe67..8b02609f01f 100644 --- a/arch/arm/src/stm32/stm32_pwm.c +++ b/arch/arm/src/stm32/stm32_pwm.c @@ -3394,7 +3394,6 @@ static int pwm_pulsecount_timer(FAR struct pwm_lowerhalf_s *dev, pwm_soft_update(dev); -#if 0 /* Now set the value of the RCR that will be loaded on the next * update event. */ @@ -3402,7 +3401,6 @@ static int pwm_pulsecount_timer(FAR struct pwm_lowerhalf_s *dev, priv->count = info->count; priv->curr = pwm_pulsecount(info->count - priv->prev); pwm_putreg(priv, STM32_ATIM_RCR_OFFSET, (uint16_t)priv->curr - 1); -#endif } /* Otherwise, just clear the repetition counter */ diff --git a/arch/arm/src/stm32h7/stm32_pwm.c b/arch/arm/src/stm32h7/stm32_pwm.c index f74afda363f..376a4af2309 100644 --- a/arch/arm/src/stm32h7/stm32_pwm.c +++ b/arch/arm/src/stm32h7/stm32_pwm.c @@ -3112,7 +3112,6 @@ static int pwm_pulsecount_timer(FAR struct pwm_lowerhalf_s *dev, pwm_soft_update(dev); -#if 0 /* Now set the value of the RCR that will be loaded on the next * update event. */ @@ -3120,7 +3119,6 @@ static int pwm_pulsecount_timer(FAR struct pwm_lowerhalf_s *dev, priv->count = info->count; priv->curr = pwm_pulsecount(info->count - priv->prev); pwm_putreg(priv, STM32_ATIM_RCR_OFFSET, (uint16_t)priv->curr - 1); -#endif } /* Otherwise, just clear the repetition counter */