aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-27 10:00:39 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-27 10:00:39 +0000
commit6d966b1a55f0295d5c8eb91a7c42ae5cc43a4938 (patch)
tree5c34786d5be7b6cc7c0026c8cbbdbf231431148e /os
parentc5c7e44f8c52159790ce2bf0cc834f86fbf80d55 (diff)
downloadChibiOS-6d966b1a55f0295d5c8eb91a7c42ae5cc43a4938.tar.gz
ChibiOS-6d966b1a55f0295d5c8eb91a7c42ae5cc43a4938.tar.bz2
ChibiOS-6d966b1a55f0295d5c8eb91a7c42ae5cc43a4938.zip
Fixed bug #448.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6580 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/STM32/TIMv1/gpt_lld.c8
-rw-r--r--os/hal/platforms/STM32/TIMv1/icu_lld.c8
-rw-r--r--os/hal/platforms/STM32/TIMv1/pwm_lld.c8
3 files changed, 24 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/TIMv1/gpt_lld.c b/os/hal/platforms/STM32/TIMv1/gpt_lld.c
index c3d228045..d847a440e 100644
--- a/os/hal/platforms/STM32/TIMv1/gpt_lld.c
+++ b/os/hal/platforms/STM32/TIMv1/gpt_lld.c
@@ -488,7 +488,11 @@ void gpt_lld_start(GPTDriver *gptp) {
rccResetTIM1();
nvicEnableVector(STM32_TIM1_UP_NUMBER,
CORTEX_PRIORITY_MASK(STM32_GPT_TIM1_IRQ_PRIORITY));
+#if defined(STM32_TIM1CLK)
+ gptp->clock = STM32_TIM1CLK;
+#else
gptp->clock = STM32_TIMCLK2;
+#endif
}
#endif
#if STM32_GPT_USE_TIM2
@@ -555,7 +559,11 @@ void gpt_lld_start(GPTDriver *gptp) {
rccResetTIM8();
nvicEnableVector(STM32_TIM8_UP_NUMBER,
CORTEX_PRIORITY_MASK(STM32_GPT_TIM8_IRQ_PRIORITY));
+#if defined(STM32_TIM8CLK)
+ gptp->clock = STM32_TIM8CLK;
+#else
gptp->clock = STM32_TIMCLK2;
+#endif
}
#endif
diff --git a/os/hal/platforms/STM32/TIMv1/icu_lld.c b/os/hal/platforms/STM32/TIMv1/icu_lld.c
index 11a10eb08..b407d33ae 100644
--- a/os/hal/platforms/STM32/TIMv1/icu_lld.c
+++ b/os/hal/platforms/STM32/TIMv1/icu_lld.c
@@ -405,7 +405,11 @@ void icu_lld_start(ICUDriver *icup) {
CORTEX_PRIORITY_MASK(STM32_ICU_TIM1_IRQ_PRIORITY));
nvicEnableVector(STM32_TIM1_CC_NUMBER,
CORTEX_PRIORITY_MASK(STM32_ICU_TIM1_IRQ_PRIORITY));
+#if defined(STM32_TIM1CLK)
+ icup->clock = STM32_TIM1CLK;
+#else
icup->clock = STM32_TIMCLK2;
+#endif
}
#endif
#if STM32_ICU_USE_TIM2
@@ -452,7 +456,11 @@ void icu_lld_start(ICUDriver *icup) {
CORTEX_PRIORITY_MASK(STM32_ICU_TIM8_IRQ_PRIORITY));
nvicEnableVector(STM32_TIM8_CC_NUMBER,
CORTEX_PRIORITY_MASK(STM32_ICU_TIM8_IRQ_PRIORITY));
+#if defined(STM32_TIM8CLK)
+ icup->clock = STM32_TIM8CLK;
+#else
icup->clock = STM32_TIMCLK2;
+#endif
}
#endif
#if STM32_ICU_USE_TIM9
diff --git a/os/hal/platforms/STM32/TIMv1/pwm_lld.c b/os/hal/platforms/STM32/TIMv1/pwm_lld.c
index 223c7428b..37ed835f5 100644
--- a/os/hal/platforms/STM32/TIMv1/pwm_lld.c
+++ b/os/hal/platforms/STM32/TIMv1/pwm_lld.c
@@ -410,7 +410,11 @@ void pwm_lld_start(PWMDriver *pwmp) {
CORTEX_PRIORITY_MASK(STM32_PWM_TIM1_IRQ_PRIORITY));
nvicEnableVector(STM32_TIM1_CC_NUMBER,
CORTEX_PRIORITY_MASK(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
@@ -458,7 +462,11 @@ void pwm_lld_start(PWMDriver *pwmp) {
CORTEX_PRIORITY_MASK(STM32_PWM_TIM8_IRQ_PRIORITY));
nvicEnableVector(STM32_TIM8_CC_NUMBER,
CORTEX_PRIORITY_MASK(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