harp-tech / protocol

Description of the Harp protocol.
https://harp-tech.org/protocol/BinaryProtocol-8bit.html
MIT License
3 stars 5 forks source link

Updating the Pico's Timer invalidates scheduled behavior #12

Closed Poofjunior closed 7 months ago

Poofjunior commented 7 months ago

For scheduled tasks (function calls) that are initialized with add_repeating_timer_us (or add_repeating_timer_ms), updating the Timer value invalidates the scheduled time when the function should be called.

Currently, we update the Pico's hardware timer when we receive a new synchronization signal. To preserve the Pico SDK's ability to reliably scheduled tasks on a particular interval, changing the timer to reflect the new time would mean we would also need to update all of the alarm times.

Poofjunior commented 7 months ago

wrong repo.