-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gimlet-seq: retry I2C errors, or die trying
Currently, the sequencer task uses `unwrap()` on I2C bus operations. However, these may fail due to transient bus errors, or fail permanently for reasons wholly outside the sequencer task's control. As discussed in issue #1205, it's incorrect for the sequencer task to unwap these errors, as panicking results in the task being restarted. On fatal bus errors, this means we crash loop. Instead, this commit changes the `gimlet-seq` task to retry failed I2C reads/writes up to three times, and, if they still fail, transition to a permanent failed state, setting the FAULT net to Ignition to indicate that the Gimlet must be power-cycled.
- Loading branch information
Showing
3 changed files
with
114 additions
and
26 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
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