summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-06 13:19:52 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-06 13:22:17 +1100
commit27c149efe030b6fd24c0cc1475ea509da1a72821 (patch)
tree15a873f0cdb89001564cfd63da08ba11dcd04ed5 /tests
parentbffda451542854fb06021e2f7fac57534e9d2768 (diff)
downloadmicropython-27c149efe030b6fd24c0cc1475ea509da1a72821.tar.gz
micropython-27c149efe030b6fd24c0cc1475ea509da1a72821.zip
stmhal: Add pyb.fault_debug() function, to control hard-fault behaviour.
This new function controls what happens on a hard-fault: - debugging disabled: board will do a reset - debugging enabled: board will print registers and stack and flash LEDs The default is disabled, ie to do a reset. This is different to previous behaviour which flashed the LEDs and waited indefinitely.
Diffstat (limited to 'tests')
-rw-r--r--tests/pyb/pyb1.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/pyb/pyb1.py b/tests/pyb/pyb1.py
index 0087ec0507..00adc85533 100644
--- a/tests/pyb/pyb1.py
+++ b/tests/pyb/pyb1.py
@@ -40,3 +40,6 @@ pyb.sync()
print(len(pyb.unique_id()))
pyb.wfi()
+
+pyb.fault_debug(True)
+pyb.fault_debug(False)