AnsweredAssumed Answered

STM32 Timer interrupts immediately after start

Question asked by Mohammad A on Sep 29, 2017

i don't know if it's a feature or bug, but starting a timer in interrupt mode will bring the code into the interrupt handler the first time mcu calls timer start function.

To solve this problem it's enought to clear the UIF bit from SR register right after timer initialization so there would be no pending interrupts.

But, is this safe to clear this bit?