diff l476rg/Src/stm32l4xx_hal_timebase_TIM.c @ 4:ca4f5b55b391

working on pwm
author cin
date Wed, 18 Jan 2017 03:27:00 +0300
parents 32a3b1785697
children
line wrap: on
line diff
--- a/l476rg/Src/stm32l4xx_hal_timebase_TIM.c	Wed Jan 18 01:07:59 2017 +0300
+++ b/l476rg/Src/stm32l4xx_hal_timebase_TIM.c	Wed Jan 18 03:27:00 2017 +0300
@@ -80,7 +80,7 @@
   HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
   
   /* Compute TIM6 clock */
-  uwTimclock = HAL_RCC_GetPCLK1Freq();
+  uwTimclock = 2*HAL_RCC_GetPCLK1Freq();
    
   /* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */
   uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000) - 1);