Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer interrupt fires just after initialization #68

Open
Art-ut-Kia opened this issue Nov 3, 2024 · 0 comments
Open

Timer interrupt fires just after initialization #68

Art-ut-Kia opened this issue Nov 3, 2024 · 0 comments

Comments

@Art-ut-Kia
Copy link

issue description: After initializing Timer1 as follows ...
image
... I observe that the first interrupt fires immediately, while I expected it to occure after 3 seconds.
After a glance into the library code, it seems that the overflow flag (TOV1) isn't cleared as explained here:
https://arduino.stackexchange.com/questions/47265/timer1-firing-immediately

board: Arduino UNO

Complement: I even observe sometimes that several (one or two) spurious interrupts occurs just after initialization of Timer1, afterwhat following interrupts are properly spaced by 3 second intervals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant