Clear SAMD TAMPER interrupt in pinalarm properly #5708
Merged
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.
Fixes DisplayIO not drawing on screen in 7.1.0 Beta 2 #5705.
In SAMD,
alarm_pin_pinalarm_reset()
was clearing the TAMPER interrupt flag with a bitwise operation, instead of just writing a 1 to the right bit, with the rest zeros, using a full register write. The bitwise operation apparently caused the other RTC interrupts to be messed up in some way, and then caused problems with other timing-based operations (probably background task handling), and showed up asdisplayio
problems.Based on the error above, looked for and fixed a few other
INTENCLR.bit
andINTENSET.bit
assignments that should ahve been full-width register writes instead, and found a few. Testedfrequencyio
to make sure it still works. Did not testwatchdog
; there is only 1 active bit in that register anyway.Unrelated improvement found when seeing if this was a
gc
-related bug (which it was not):keypad
module dict was mutable, but it could be constant. This was probably a leftover of an earlier version ofkeypad
.