aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-27 09:58:59 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-27 09:58:59 +0000
commit976bc3e3fccaa4f793ebec1ab79089e7d1534310 (patch)
tree0b4e40d5e71a1536fb222dd6414833308cf62b9b /os/hal/ports/STM32
parent9d55b0877dbd2a79efac41ff83e851064361a54c (diff)
downloadChibiOS-976bc3e3fccaa4f793ebec1ab79089e7d1534310.tar.gz
ChibiOS-976bc3e3fccaa4f793ebec1ab79089e7d1534310.tar.bz2
ChibiOS-976bc3e3fccaa4f793ebec1ab79089e7d1534310.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6577 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32')
-rw-r--r--os/hal/ports/STM32/TIMv1/gpt_lld.c8
-rw-r--r--os/hal/ports/STM32/TIMv1/icu_lld.c8
-rw-r--r--os/hal/ports/STM32/TIMv1/pwm_lld.c8
3 files changed, 24 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/TIMv1/gpt_lld.c b/os/hal/ports/STM32/TIMv1/gpt_lld.c
index f9e144417..b817c5d26 100644
--- a/os/hal/ports/STM32/TIMv1/gpt_lld.c
+++ b/os/hal/ports/STM32/TIMv1/gpt_lld.c
@@ -486,7 +486,11 @@ void gpt_lld_start(GPTDriver *gptp) {
rccEnableTIM1(FALSE);
rccResetTIM1();
nvicEnableVector(STM32_TIM1_UP_NUMBER, 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
@@ -546,7 +550,11 @@ void gpt_lld_start(GPTDriver *gptp) {
rccEnableTIM8(FALSE);
rccResetTIM8();
nvicEnableVector(STM32_TIM8_UP_NUMBER, 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/ports/STM32/TIMv1/icu_lld.c b/os/hal/ports/STM32/TIMv1/icu_lld.c
index 09be838a6..ae9cc944f 100644
--- a/os/hal/ports/STM32/TIMv1/icu_lld.c
+++ b/os/hal/ports/STM32/TIMv1/icu_lld.c
@@ -402,7 +402,11 @@ void icu_lld_start(ICUDriver *icup) {
rccResetTIM1();
nvicEnableVector(STM32_TIM1_UP_NUMBER, STM32_ICU_TIM1_IRQ_PRIORITY);
nvicEnableVector(STM32_TIM1_CC_NUMBER, 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
@@ -443,7 +447,11 @@ void icu_lld_start(ICUDriver *icup) {
rccResetTIM8();
nvicEnableVector(STM32_TIM8_UP_NUMBER, STM32_ICU_TIM8_IRQ_PRIORITY);
nvicEnableVector(STM32_TIM8_CC_NUMBER, 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/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