2014-04-08 06:48 AM
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-timer2014-04-08 07:03 AM
Values programmed into Prescaler and Period in the form N-1
Prescaler = 2 - 1; Period = 42000 - 1; (84000000 / 2) / 42000 = 1000 Hz2014-04-08 09:49 AM