diff options
author | Damien George <damien.p.george@gmail.com> | 2017-02-06 13:19:52 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-02-06 13:22:17 +1100 |
commit | 27c149efe030b6fd24c0cc1475ea509da1a72821 (patch) | |
tree | 15a873f0cdb89001564cfd63da08ba11dcd04ed5 /stmhal/stm32_it.h | |
parent | bffda451542854fb06021e2f7fac57534e9d2768 (diff) | |
download | micropython-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 'stmhal/stm32_it.h')
-rw-r--r-- | stmhal/stm32_it.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stmhal/stm32_it.h b/stmhal/stm32_it.h index fc61d57be1..a168cda838 100644 --- a/stmhal/stm32_it.h +++ b/stmhal/stm32_it.h @@ -63,6 +63,8 @@ ****************************************************************************** */ +extern int pyb_hard_fault_debug; + void NMI_Handler(void); void HardFault_Handler(void); void MemManage_Handler(void); |