AnsweredAssumed Answered

TIMER Update Event Not Affected from Changing CLOCK DIVISION Value

Question asked by Mesut TOPUZLU on Jun 29, 2017
Latest reply on Mar 4, 2018 by Daniel Koster

Hi. I use Keil Compiler and HAL lib. I configure TIM4 as normal timer (time base counter) and implement Update event with HAL_TIM_PeriodElapsedCallback function. My initialization code below;


TIM4_Handler.Init.Prescaler=16000; // 16 MHZ/16000 = 1000 Hz -> 1 ms inc/dec period
TIM4_Handler.Init.Period=1000; // 1msec x 1000 = 1 sec overflow inerrupt


When I run code like above, UEV interrupt occure in 1 sec. This is normal

But when I change clock division  suc as TIM_CLOCKDIVISION_DIV4, this period is not affected. There is an UEV interrupt in 1 sec.


What is the problem?  (Note that my APB1/2 clock is 16MHZ)