diff --git a/tools/pyboard.py b/tools/pyboard.py index 29af27f02ba2e..c0bb778a321ee 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -287,11 +287,15 @@ def __init__( for attempt in range(wait + 1): try: if os.name == "nt": - # Windows does not set DTR or RTS by default self.serial = serial.Serial(**serial_kwargs) - self.serial.dtr = True - self.serial.rts = False self.serial.port = device + portinfo = list(serial.tools.list_ports.grep(device)) # type: ignore + if portinfo and portinfo[0].manufacturer != "Microsoft": + # ESP8266/ESP32 boards use RTS/CTS for flashing and boot mode selection. + # DTR False: to avoid using the reset button will hang the MCU in bootloader mode + # RTS False: to prevent pulses on rts on serial.close() that would POWERON_RESET an ESPxx + self.serial.dtr = False # DTR False = gpio0 High = Normal boot + self.serial.rts = False # RTS False = EN High = MCU enabled self.serial.open() else: self.serial = serial.Serial(device, **serial_kwargs) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy