From 1f740bdaf42e8669e1678ba78b5ca6f2d2abc101 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Thu, 1 May 2014 20:42:23 +0100 Subject: [PATCH] Make pyboard.enter_raw_repl more robust In case there's a program in the microcontroller's main.py running in an infinite loop --- tools/pyboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/pyboard.py b/tools/pyboard.py index a44710914e..2484a1a080 100644 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -50,6 +50,7 @@ class Pyboard: return data def enter_raw_repl(self): + self.serial.write(b'\r\x03') # ctrl-C: interrupt any running program self.serial.write(b'\r\x01') # ctrl-A: enter raw REPL self.serial.write(b'\x04') # ctrl-D: soft reset data = self.read_until(1, b'to exit\r\n>')