Skip to content

fix(serial): clear RTS before DTR at open so attach does not reset ESP chips (#1617) - #1619

Merged
zackees merged 2 commits into
mainfrom
fix/1617-open-rts-before-dtr
Oct 2, 2026
Merged

zackees merged 2 commits into
mainfrom
fix/1617-open-rts-before-dtr

Conversation

@zackees

@zackees zackees commented Oct 2, 2026

Copy link
Copy Markdown
Member

The OS asserts DTR=1/RTS=1 on open. The manager and serial probe read
then cleared DTR before RTS, passing through (DTR=0, RTS=1) -- the ESP
USB-Serial-JTAG "hold in reset" state -- so every attach rebooted the
chip. On the ESP32-P4 that reset re-enumerates USB and the session dies
with Broken pipe.

Add esp_reset::apply_idle_control_lines (RTS first, then DTR) and use it
at both manager open sites; reorder serial_probe the same way.

Verified on an ESP32-P4: four consecutive serial probe read opens with
no ESP-ROM banner, ping answers with 850 s uptime (previously every open
printed rst:0x17 CHIP_USB_UART_RESET).

Closes #1617

…P chips (#1617)

The OS asserts DTR=1/RTS=1 on open. The manager and `serial probe read`
then cleared DTR before RTS, passing through (DTR=0, RTS=1) -- the ESP
USB-Serial-JTAG "hold in reset" state -- so every attach rebooted the
chip. On the ESP32-P4 that reset re-enumerates USB and the session dies
with Broken pipe.

Add esp_reset::apply_idle_control_lines (RTS first, then DTR) and use it
at both manager open sites; reorder serial_probe the same way.

Verified on an ESP32-P4: four consecutive `serial probe read` opens with
no ESP-ROM banner, ping answers with 850 s uptime (previously every open
printed rst:0x17 CHIP_USB_UART_RESET).

Closes #1617
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: FastLED/fbuild/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 45d33e39-8df1-47a4-9b25-f8ebc1f73971

📥 Commits

Reviewing files that changed from the base of the PR and between 4f49540 and 6341bbd.

📒 Files selected for processing (3)
  • crates/fbuild-cli/src/cli/serial_probe.rs
  • crates/fbuild-serial/src/esp_reset.rs
  • crates/fbuild-serial/src/manager.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit ed83890 into main Oct 2, 2026
23 checks passed
@zackees
zackees deleted the fix/1617-open-rts-before-dtr branch October 2, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Serial attach resets ESP32 USB-Serial-JTAG chips (DTR cleared before RTS); P4 re-enumerates and the session dies

1 participant