2025-06-25 7:46 AM - last edited on 2025-06-25 7:53 AM by mƎALLEm
Hi
I am facing one issue I am trying to run Timer2 and as soon I have enable the by setting CR1 register bit CEN, My all flags in SR is getting set even I have enabled only(UIE) so my UIF flag bit in SR register must set but it is setting all (CC4IF CC3IF CC2IF CC1IF) .
Can you help me to understand is it normal or why it was happened?
B.R
Ashish
2025-06-25 8:27 AM
The flags get set regardless of whether or not the interrupt for that flag is enabled.
CCxIF flags will be set if CCRx = 0 and the counter is started with the channel in output mode (default). If the interrupt is not enabled, it will not fire as a result of these flags. This is the expected behavior and no action is required.