Detect STLink connection
Our hardware uses the STM32H745XI. We would like the firmware to be able to detect if it is being debugged, perhaps by detecting the presence of the debugger.
When using a JLink the DBGMCU->CR bits DBGSLPD1, DBGSTPD1 and DBGSTBD1 are set however if I use an STLink those bits are not set.
Is it possible to use DBGMCU->CR to detect the STLink is connected?
Is there another method of detecting a debugger is connected?
