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 <gnutt@nuttx.org>
This commit is contained in:
parent
32f89d63f7
commit
aaa173dd37
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user