2015-08-13 11:39 PM
Hello!
I have a little question about STM8S interrupt controller. I'm using IAR and the following code isn't quite clear for me.
INTERRUPT_HANDLER(TIM2_UPD_OVF_BRK_IRQHandler, 13)
{
//Here are 100 kHz
if
(TIM2->SR1&TIM2_SR1_UIF)
{
TIM2->SR1 &= ~TIM2_SR1_UIF;
//Here is 1 kHz
//with my TIM2 settings
}
}
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! #interrupt #stm8 #iar #timer