Question
Timer 2 Frequency
Posted on April 08, 2014 at 15:48
Hello everyone,
I am trying to Set up timer with 1ms Tick value and it does not seems to be working correctly. TIM_TimeBaseStructure.TIM_Period = TIMER_MAIN_1MS_VAL; TIM_TimeBaseStructure.TIM_Prescaler = 2; TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;Where TIMER_MAIN_1MS_VAL = A410Clock Freq = 84Mhz. so the formula would be 1/84000000 = 1.1904e^-8 1.1904e^-8 *42000(A410) = .0005 prescalar is 2 so it become .001 means 1ms. But it doesn't seems to be working. Any help guys.. 1/ Clock Freq #stm32 #stm32-timer-counter #stm32-timer