Skip to content

Timer interrupt fires just after initialization #68

@Art-ut-Kia

Description

@Art-ut-Kia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions