Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAMD21 fixes #113

Merged
merged 2 commits into from
Apr 10, 2020
Merged

SAMD21 fixes #113

merged 2 commits into from
Apr 10, 2020

Conversation

dhalbert
Copy link

@dhalbert dhalbert commented Apr 9, 2020

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.

@dhalbert dhalbert requested a review from tannewt April 9, 2020 18:12
@pelikhan pelikhan requested a review from mmoskal April 9, 2020 18:36
@dhalbert dhalbert mentioned this pull request Apr 9, 2020
@mmoskal
Copy link
Collaborator

mmoskal commented Apr 9, 2020

For some space savings, you can disable USE_HID_HANDOVER and USE_MSC_HANDOVER - we no longer use this as it was unreliable.

@mmoskal
Copy link
Collaborator

mmoskal commented Apr 9, 2020

(sorry I didn't mention it earlier, I just now looked through the code on our side to confirm)

Copy link
Collaborator

@mmoskal mmoskal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but didn't look too closely

@dhalbert dhalbert merged commit c05ce50 into adafruit:master Apr 10, 2020
@dhalbert dhalbert deleted the fuse-repair-fixes branch April 10, 2020 16:56
pesco pushed a commit to pesco/uf2-samdx1 that referenced this pull request Jul 26, 2023
fix Wait States in samd51 init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drive dissapears on v3.8.0 - circuitplayground - m0 Lessons learned after Fuses have gone bad(=0xffffffff)
2 participants