Skip to content

spurious IRQs in periph_timer #18976

@maribu

Description

@maribu

Description

It turned out that some periph_timer implementations just masked IRQs on timer_clear(). If the interrupt condition then occurred later on, the IRQ flag was set but (due to being masked) not executed. However, the next call to timer_set_absolute() unmasked the IRQ, which resulted in the pending flag to directly cause the timer to fire.

Expected results

timer_set_absolute() doesn't fire directly on setting (if the target is in the future), so that tests/periph_timer from #18963 passes.

Actual results

timer_set_absolute() occasionally fires right away at least on some implementations and #18963 fails.

Tracking

Versions

Current master, 2022.10-branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)Type: trackingThe issue tracks and organizes the sub-tasks of a larger effort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions