AnsweredAssumed Answered

TIM2 interrupt at 100 kHz frequency

Question asked by ovcharuk.kirill on Aug 14, 2015
Hello!
I have a little question about STM8S interrupt controller.
I'm using IAR and the following code isn't quite clear for me.
01.INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13)
02.{
03.//Here are 100 kHz
04.if (TIM2->SR1&TIM2_SR1_UIF)
05.{
06.TIM2->SR1 &= ~TIM2_SR1_UIF;
07.//Here is 1 kHz
08.//with my TIM2 settings
09.}
10. 
11.}
I need 1 kHz interrupt and I got it. But why IM2_UPD_OVF_BRK_IRQHandler switches at 100 kHz frequency? Why not 1 kHz? Or any frequency else?
I hope you got it clear. Thanks!

Outcomes