aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD/TIMv1/pwm_lld.h')
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/pwm_lld.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.h b/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.h
index 5b54847fb..12149f2a8 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.h
+++ b/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.h
@@ -305,7 +305,7 @@ typedef uint32_t pwmchnmsk_t;
/**
* @brief Type of a PWM counter.
*/
-typedef uint16_t pwmcnt_t;
+typedef uint32_t pwmcnt_t;
/**
* @brief Type of a PWM driver channel configuration structure.
@@ -430,7 +430,7 @@ struct PWMDriver {
* @notapi
*/
#define pwm_lld_change_period(pwmp, period) \
- ((pwmp)->tim->ARR = (uint16_t)((period) - 1))
+ ((pwmp)->tim->ARR = ((period) - 1))
/*===========================================================================*/
/* External declarations. */