-
-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bangle.js2: DFU update from flash now retries if CRC doesn't match
- Loading branch information
1 parent
bcf744a
commit c05f231
Showing
2 changed files
with
47 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c05f231
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wonder how do you get out of this if the CRC or file data is stored wrong when the firmware is uploaded? Imagine header.CRC is simply wrong and not matching the rest of the data - will this end in neverending loop? You also ping watchdog so no way to hold button to get out of this(?)
c05f231
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If header.CRC is wrong then flashDoUpdate never gets called. There's a check earlier on - all we're doing here is checking that it's been written ok, because it seems in some instances it can fail