-
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make I2C sources suitable for commutation or output encoders
Previously, I2C sources were only polled in the main thread during the 1 ms poll cycle. This meant that if things were off-nominal, like during startup when some things block the main thread for a long time, the I2C devices would not be polled at all, and for some time after as the ms loop caught back up. It could also cause the PLL filter to get mightily confused. Either of those two effects rendered control unusable. So, now we perform I2C operations from the control interrupt like other encoder sources. This hurts our "good case" ISR timing even with no I2C devices enabled, but means the I2C devices keep working even if the main loop is bogged down. While we are at it, change the I2C configuration to permit microsecond level period selection. Doing so requires that we bump the ABI version so that moteus_tool can upgrade the previous millisecond level period selection.
- Loading branch information
Showing
6 changed files
with
107 additions
and
56 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
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