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.
This does two things:
-- Fixes regression that arrived at some point in SAMD21 updater, which caused bricked boards. Fixes #112. Tagging @pelikhan.
-- Adds a mini fuse resetter to SAMD21 boards to fix fuses if first fuse word is set to all 1's, which causes continuous watchdog resets. Fixes #107.
I cleaned up the
selfmain.c
fuse-writing code a lot in the process of getting it to work again on SAMD21. Some trickery was removed. I would have liked to use this code for the SAMD21 fuse resetter mentioned above, but it was too big, so I used a stripped-down version. There are only 36 bytes free in the SAMD21 bootloader now.Eventually a fuse resetter could be added to SAMD51 too, but right now there is enough time before the watchdog timer goes off to run the updater.
Next step after this is to merge in two new boards and make a 3.9.0 release.