platformio / platformio/platformio-core

monitor_rts/dtr not working with ESP32 with auto-upload wiring

Open
#4,354 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

device management feature
Dominant language
Python
Stars
9.5k
Forks
905
Avg merge
2d 13h
Merged PRs (30d)
2

Description

What kind of issue is this?

  • Feature Request.
    Start by telling us what problem you’re trying to solve. Often a solution
    already exists! Don’t send pull requests to implement new features without first getting our
    support. Sometimes we leave features out on purpose to keep the project small.

Configuration

Operating system:

PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.0

Description of problem

I've designed a PCB with a ESP32 as controller with an automatic upload functionality using the RTS/DTR linked to the EN/IO0 of the ESP32. The upload works flawlessly and the microcontroller itself is working fine, too - however getting verbose information back via Serial communication is tricky as the monitor will use the RTS/DTR lines, too - which effectively resets the microcontroller and preventing it from running.
I'm perfectly aware of monitor_rts/dtr = 0 and this doesn't work (I guess due to timing issues). Disabling RTS and DTR manually within the montiro using STRG-T D and hen STRG-T R does the job however.

Is there any option available to influence the timing of these monitor_rts/dtr settings? Ideal would be a way to start with both set to "1" and then set first DTR to "0" and afterwards RTS to "0".

See: https://community.platformio.org/t/upload-and-monitor-task-problem-with-dtr-and-rts/15947/3 for other users with the same issue.

Steps to Reproduce
  1. Design PCB with auto upload functionality and ESP32
    grafik

  2. Upload sample code (see below)

  3. Attach monitor

Actual Results

The esp is set to programming mode instead of attaching the serial

Expected Results

The monitor is attached to the serial of the esp and you'll get serial communication back.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:esp32dev]
platform = espressif32
board = esp32dev
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
framework = arduino

Source file to reproduce issue:

#include <arduino.h>
 void setup() {Serial.begin(115200); Serial.println("Test");  }
 void loop() { }
Additional info

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the monitor_rts and monitor_dtr settings in the provided platformio.ini and reproduce the reset behavior using the ESP32 wiring and sample source. Review how the serial monitor handles these settings and its manual Ctrl-T D/R controls; done means attaching without entering programming mode while preserving the requested RTS/DTR sequencing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.