fix: Fixed glitches on RTS line when no_reset option on Windows

This commit is contained in:
Jakub Kocka
2024-01-24 13:20:26 +01:00
parent 4c2e113501
commit 956557be93
2 changed files with 11 additions and 4 deletions

View File

@@ -300,7 +300,17 @@ class ESPLoader(object):
if isinstance(port, str):
try:
self._port = serial.serial_for_url(port, exclusive=True)
self._port = serial.serial_for_url(
port, exclusive=True, do_not_open=True
)
if sys.platform == "win32":
# When opening a port on Windows,
# the RTS/DTR (active low) lines
# need to be set to False (pulled high)
# to avoid unwanted chip reset
self._port.rts = False
self._port.dtr = False
self._port.open()
except serial.serialutil.SerialException as e:
port_issues = [
[ # does not exist error

View File

@@ -869,9 +869,6 @@ class TestExternalFlash(EsptoolTestCase):
self.verify_readback(0, 1024, "images/one_kb.bin", spi_connection=self.conn)
@pytest.mark.skipif(
os.name == "nt", reason="Temporarily disabled on windows"
) # TODO: ESPTOOL-673
class TestStubReuse(EsptoolTestCase):
def test_stub_reuse_with_synchronization(self):
"""Keep the flasher stub running and reuse it the next time."""