diff --git a/tools/pycard10.py b/tools/pycard10.py index a0ce74190e58efef07ac94e4858166cef845d350..5f0a870c2db5e5bf92f6b96a3e5531da63f9f95a 100755 --- a/tools/pycard10.py +++ b/tools/pycard10.py @@ -130,10 +130,12 @@ class PyCard10(Pyboard): None """ - self.soft_reset() - self.serial.write(b"\x03\x03") # ctrl-C twice: interrupt any running program + self.serial.write(b"\x02") # ctrl-B: ensue it's the normal mode + + self.serial.write(b'__import__("os").exec("")\r') # Reset to REPL + # flush input (without relying on serial.flushInput()) n = self.serial.inWaiting() while n > 0: @@ -176,8 +178,6 @@ class PyCard10(Pyboard): self.serial.write(b"\x04") # ctrl-D: do the reset - time.sleep(1) # Give epicardium some time to cycle pycardium - n = self.serial.inWaiting() while n > 0: self.serial.read(n)