My platform is ESP32-wroom (Devkit v1 board). ESP-IDF 5.0 on Win10.

I've been using PuTTY to monitor the ESP32's serial log and output (the main serial where all the diagnostic info goes, not the optional ones). It worked just fine.

However, today I've noticed that upon closing PuTTY's terminal window (and clicking "ok" when it asks "Are you sure you want to close the session?") the ESP32 comes to a complete halt. The program running on it stops. Power, however, is still on. Using ESP-IDF's VSCode extension "monitor" function does not cause this effect, however.

I've tried flashing the official blink example to see if the problem was in my code. But nope, the LED stops blinking the moment I disconnect the PuTTY terminal session. What may be the reason?

P.S: I'm aware that ESP32 may use RTS/DTR pins of the serial for some internal controls, i.e. every time serial connection is established, ESP32 soft-resets. Is that the case here too? I.e. maybe PuTTY sends some signal over serial that ESP32 interprets as "halt"?

Steps to recreate this: 1.Flash official blink example, connect an LED to a chosen pin.Confirm that the led blinks. 2. Connect to ESP32 with PuTTY (115200baud serial) 3. Close the PuTTY terminal window by clicking on the X then "Ok" 4. LED will stop blinking.


1 Answer 1


Using a terminal program to access a serial port will generally control DTR.

Closing a serial port will bring DTR to inactive level, and opening a serial port will bring DTR to active level.

  • 1
    \$\begingroup\$ This is correct. To OP: if your use case requires it, you can desolder the transistor that pulls EN low to ignore the state of the serial connection. \$\endgroup\$
    – TypeIA
    Commented May 15, 2023 at 18:20
  • \$\begingroup\$ @TypeIA Thanks, I see that this is a hardware issue. Since EN button is basically RESET for ESP32, does it mean that once serial is disconnected the EN pin is held down by the port? Also, it is not possible to physically desolder the EN pin control. Is there a way to prevent PuTTY from sending "pull DTR to LOW" command to the USB-to-SERIAL chip on the ESP32 devboard? Or, is there some other terminal emulator/serial monitor software that can disconnect serial without pulling DTS low? \$\endgroup\$
    – Noideas
    Commented May 16, 2023 at 9:31
  • 1
    \$\begingroup\$ It's not a hardware issue, it's a feature built on purpose. DTR and RTS handshake pins are used by PC software to put the hardware into firmware upload mode to upload new firmware. I don't know if you can control PuTTY to do that or is it a feature of your OS or serial drivers. Have you checked the settings of PuTTY, OS or drivers? On last resort, don't use PuTTY if it does not work for you. \$\endgroup\$
    – Justme
    Commented May 16, 2023 at 9:44
  • 1
    \$\begingroup\$ Don't desolder the EN pin! Desolder the transistor. Refer to the dev board schematics. This is no standard, it's just a trick the designers of the dev board decided to use. If you remove the transistor you'll have to use the tactile switches (buttons) on the board to program it. \$\endgroup\$
    – TypeIA
    Commented May 16, 2023 at 10:23
  • 1
    \$\begingroup\$ Q1 in the picture in this question: electronics.stackexchange.com/questions/473443/… or if it's easier removing R21 would also work. \$\endgroup\$
    – TypeIA
    Commented May 16, 2023 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.