summaryrefslogtreecommitdiffstatshomepage
path: root/tools/pyboard.py
diff options
context:
space:
mode:
authorAndrew Scheller <github@loowis.durge.org>2014-05-01 20:42:23 +0100
committerAndrew Scheller <github@loowis.durge.org>2014-05-01 20:42:23 +0100
commit1f740bdaf42e8669e1678ba78b5ca6f2d2abc101 (patch)
treebb0fd273ffd6b32ed797f61a75aa793fc216a24b /tools/pyboard.py
parent1f85d6255d6929edbcfc087e4e07c2fde39c3632 (diff)
downloadmicropython-1f740bdaf42e8669e1678ba78b5ca6f2d2abc101.tar.gz
micropython-1f740bdaf42e8669e1678ba78b5ca6f2d2abc101.zip
Make pyboard.enter_raw_repl more robust
In case there's a program in the microcontroller's main.py running in an infinite loop
Diffstat (limited to 'tools/pyboard.py')
-rw-r--r--tools/pyboard.py1
1 files changed, 1 insertions, 0 deletions
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>')