Question
TIMER7 INTERRUPT FLAG NOT CLEARING
Posted on October 30, 2011 at 19:12
Hello,
I have one problem about clearing timer7 interrupt flag at different timer clock prescaler,void TIM7_IRQHandler(void){ if (ih == 0) ih=1; else ih=0; TIM7->SR = 0x0;}I m setting APB1 presclaer value 2 , timer7 prescaler 0x1FF .With this configuration TIM7->SR = 0x0; command working properly and clearing UIF flag.But if i choose Apb1 prescaler like 16 ,same command is not clearing UIF flag ,i should write 3 times same code or i should clear and read (TIM7->SR = 0x0; and x= TIM7->SR ;).Why does it not clear flag in higer APB1 prescaler value? Is there any relation between pulsewidth of interrupt signal and cpu core clk frequency?