Why does a timer operating in interrupt mode generate an update event immediately after intialization?
Hello
I have TIM3 set up like so:
- ABP1 Timer clock = 84 MHz
- Prescaler = 8399
- Period 9999
- Update event selected as trigger
- NVIC enabled for TIM3 global interrupt
This gives me a timer interrupt every 1 second. But it appears as though the callback HAL_TIM_PeriodElapsedCallback is called immediately after I call HAL_TIM_Base_Start_IT(&htim3) and then in intervals of 1 second thereafter.
Why does the period elapse immediately after starting the timer? Is there a way to get around this?
