AnsweredAssumed Answered

Test if running STM32 under debugger.

Question asked by rigby_jones.michael on Jun 11, 2012
Latest reply on Jun 15, 2012 by rigby_jones.michael
I'm using the 2 wire serial debug pins as GPIO under normal operating conditions, the JTAG/SW functionality gets disabled early in the main function.  Obviously this would prevent debugging as the debugger disconnects as soon as the SW lines as reconfigured, so I currently check the status of another I/O pin to see whether I should reconfigure the SW pins or not.  Is it possible to test (from user code) whether the STM is running under the debugger so I can automatically reconfigure these pins as required without having to set a value on another pin?