RP2040: Fix 64-bit uptime being wrapped as a 32-bit value whenever a timer event happens #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
The RP2040 timer implementation is wrapping the 64-bit uptime as if it were a 32-bit value, which is unexpected and makes it impossible to use the 64-bit uptime correctly.
Convert 32-bit timestamps to 64-bit values and stop forcing the uptime to be wrapped.
Check for a timer target being missed because it's now in the past and use the correct API to force an immediate timer event in an interrupt context.
Fixes arduino/ArduinoCore-mbed#1063.
Impact of changes
Uptime as a 64-bit value is no longer wrapped as a 32-bit value when a timer event happens.
Uptime as a 32-bit value is not impacted and unaffected.
Migration actions required
Remove workarounds that may have been added because the 64-bit uptime has been wrapped.
Documentation
None
Pull request type
Test results