Skip to content

Capsule: release GPIO13/15 after the I2C STOP issued at board detection - #393

Merged
lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:capsule_grove_restore
Oct 7, 2026
Merged

lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:capsule_grove_restore

Conversation

@ainyan03

@ainyan03 ainyan03 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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_t before 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():

GPIO13 GPIO15
develop enabled, High enabled, High
this PR disabled disabled

Thanks to the reporter for the analysis and the proposed fix.

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.
@lovyan03
lovyan03 merged commit e665243 into m5stack:develop Oct 7, 2026
30 checks passed
@ainyan03
ainyan03 deleted the capsule_grove_restore branch October 7, 2026 03:24
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.

2 participants