micropython/tools/mpremote/mpremote
Angus Gratton 3dd8073c29 tools/mpremote: Workaround ESP DTR/RTS reset quirk at disconnect time.
The problem with ESP board spurious reset happens at disconnect time on
Windows (clearing DTR before RTS triggers a reset).

Previous workarounds tried to detect possible ESP boards and apply the
correct DTR and RTS settings when opening the port.

Instead, we can manually clear RTS before closing the port and thereby
avoid the reset issue. Opening the port can keep the default behaviour
(RTS & DTR both set).

close() is called from a finally block in the mpremote main module
(via do_disconnect()) - so this should always happen provided the Python
process isn't terminated by the OS.

One additional workaround is needed to prevent a spurious reset first time
a Silicon Labs CP210x-based ESP board is opened by mpremote after
enumeration.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-10-01 09:10:38 +10:00
..
__init__.py tools/mpremote: Use hatch to build mpremote package. 2023-02-24 11:40:22 +11:00
__main__.py tools/mpremote: Allow running mpremote with python -m. 2022-03-30 15:29:26 +11:00
commands.py all: Go back to using default ruff quote style. 2025-07-24 12:48:18 +10:00
console.py all: Fix cases of Python variable assigned but never used. 2023-05-02 16:36:05 +10:00
main.py tools/mpremote: Locate config.py location across different host OSes. 2025-08-02 00:22:32 +10:00
mip.py tools/mpremote: For mip install, use hash to skip files that exist. 2025-05-02 11:44:32 +10:00
mp_errno.py tools/mpremote: Fix errno.ENOTBLK attribute error on Windows. 2025-08-01 14:52:59 +10:00
repl.py all: Go back to using default ruff quote style. 2025-07-24 12:48:18 +10:00
romfs.py tools/mpremote: Add romfs query, build and deploy commands. 2025-03-06 12:52:35 +11:00
transport_serial.py tools/mpremote: Workaround ESP DTR/RTS reset quirk at disconnect time. 2025-10-01 09:10:38 +10:00
transport.py tools/mpremote: Support OSError's on targets without errno. 2025-07-08 21:52:56 +10:00