diff options
Diffstat (limited to 'os/hal/ports/STM32/TIMv1/pwm_lld.c')
-rw-r--r-- | os/hal/ports/STM32/TIMv1/pwm_lld.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/TIMv1/pwm_lld.c b/os/hal/ports/STM32/TIMv1/pwm_lld.c index 12abc0c44..7fc9b980d 100644 --- a/os/hal/ports/STM32/TIMv1/pwm_lld.c +++ b/os/hal/ports/STM32/TIMv1/pwm_lld.c @@ -407,7 +407,11 @@ void pwm_lld_start(PWMDriver *pwmp) { rccResetTIM1();
nvicEnableVector(STM32_TIM1_UP_NUMBER, STM32_PWM_TIM1_IRQ_PRIORITY);
nvicEnableVector(STM32_TIM1_CC_NUMBER, STM32_PWM_TIM1_IRQ_PRIORITY);
+#if defined(STM32_TIM1CLK)
+ pwmp->clock = STM32_TIM1CLK;
+#else
pwmp->clock = STM32_TIMCLK2;
+#endif
}
#endif
#if STM32_PWM_USE_TIM2
@@ -449,7 +453,11 @@ void pwm_lld_start(PWMDriver *pwmp) { rccResetTIM8();
nvicEnableVector(STM32_TIM8_UP_NUMBER, STM32_PWM_TIM8_IRQ_PRIORITY);
nvicEnableVector(STM32_TIM8_CC_NUMBER, STM32_PWM_TIM8_IRQ_PRIORITY);
+#if defined(STM32_TIM8CLK)
+ pwmp->clock = STM32_TIM8CLK;
+#else
pwmp->clock = STM32_TIMCLK2;
+#endif
}
#endif
#if STM32_PWM_USE_TIM9
|