Repository navigation
Capsule: release GPIO13/15 after the I2C STOP issued at board detection - #393
Merged
Merged
Conversation
The STOP sequence on the Grove port (added for UnitHEART / MAX30100) left both pins as push-pull outputs driving High. Drivers that only enable the input path, such as the RMT RX driver on ESP-IDF 5.4 and later, then cannot see the external signal. The pins are now saved before the sequence and restored after it, as done for the other detection pins, so the STOP no longer leaves the port driven. After the restore the line level depends on the saved pin setting and the external pull-ups, as it did before detection.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #390.
After Capsule is detected,
_check_boardtype()issues an I2C STOP on the Grove port (GPIO15 / 13, added for UnitHEART / MAX30100) and leaves both pins as push-pull outputs driving High. Drivers that only enable the input path, such as the RMT RX driver on ESP-IDF 5.4 and later, then cannot see the external signal.As proposed in #390, the two pins are now saved with
pin_backup_tbefore the sequence and restored after it, in the same way as the other detection pins. The STOP sequence itself is unchanged.Tested on Capsule (Arduino-ESP32 3.x), output enable of GPIO13 / 15 after
M5.begin():Thanks to the reporter for the analysis and the proposed fix.