Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Question: How do I clear the interrupt caused by Counter/Timer/PWM component so that the next interrupt is processed by the CPU?
To clear interrupt caused by peripherals, inside the ISR code, read the status register of the peripheral causing the interrupt. This status read will clear the ‘interrupt request’ bit of the peripheral.
So for clearing the interrupts caused by counter, Counter_ReadStatusRegister API should be called inside the counter's ISR. This will clear the interrupt request enabling further interrupts.