From e068671a361fff569fdc386c762680032670737c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 1 Mar 2015 09:07:50 +0000 Subject: [PATCH] Fixed bug #557. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7704 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/STM32F3xx/hal_lld.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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) || \