zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
9.83k stars 6.06k forks source link

drivers: counter: fix the bug for atcpit100 #72836

Closed kevinwang821020 closed 1 week ago

kevinwang821020 commented 2 weeks ago

The purpose of this PR is: Let the callback execute after the interrupt status has cleared. Because if the callback is executed before the interrupt status is cleared, it might cause subsequent counter interrupts to fail to trigger due to the callback function taking too long to execute. This change has been verified on the adp_xc7k/ae350 board.