Skip to content

Question about resetting the timer expiration on a wraparound in the Systick section. #60

@bluemock

Description

@bluemock

if (now + prd < *t) *t = 0; // Time wrapped? Reset timer
if (*t == 0) *t = now + prd; // First poll? Set expiration

Wouldn't resetting the expiration obstruct the timing of the task currently being timed? It could add a delay up to two times the period based on my back-of-the-envelope calculations. Is this acceptable in the grand-scheme of things? What if we need precise millisecond timing, is it better to add checks within the ISR itself?
Thank you.

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