diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-01 09:07:50 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-01 09:07:50 +0000 |
commit | e068671a361fff569fdc386c762680032670737c (patch) | |
tree | 3413ea28c47403844f9a487d91f15779d57d92d0 | |
parent | 40304ed99332e0cfca0f134e250c60eec64042ce (diff) | |
download | ChibiOS-e068671a361fff569fdc386c762680032670737c.tar.gz ChibiOS-e068671a361fff569fdc386c762680032670737c.tar.bz2 ChibiOS-e068671a361fff569fdc386c762680032670737c.zip |
Fixed bug #557.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7704 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/STM32F3xx/hal_lld.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32F3xx/hal_lld.h b/os/hal/ports/STM32/STM32F3xx/hal_lld.h index c5f0c5194..9cd53c61f 100644 --- a/os/hal/ports/STM32/STM32F3xx/hal_lld.h +++ b/os/hal/ports/STM32/STM32F3xx/hal_lld.h @@ -1046,7 +1046,11 @@ * @brief TIM1 frequency.
*/
#if STM32_TIM1SW == STM32_TIM1SW_PCLK2
+#if STM32_PPRE2 == STM32_PPRE2_DIV1
#define STM32_TIM1CLK STM32_PCLK2
+#else
+#define STM32_TIM1CLK (STM32_PCLK2 * 2)
+#endif
#elif STM32_TIM1SW == STM32_TIM1SW_PLLX2
#if (STM32_SW != STM32_SW_PLL) || \
@@ -1064,7 +1068,11 @@ * @brief TIM8 frequency.
*/
#if STM32_TIM8SW == STM32_TIM8SW_PCLK2
+#if STM32_PPRE2 == STM32_PPRE2_DIV1
#define STM32_TIM8CLK STM32_PCLK2
+#else
+#define STM32_TIM8CLK (STM32_PCLK2 * 2)
+#endif
#elif STM32_TIM8SW == STM32_TIM8SW_PLLX2
#if (STM32_SW != STM32_SW_PLL) || \
|