Is there a way for firmware running on the nRF52 to detect the presence of a SEGGER (or other) SWD capable device? I've looked through all the nRF registers but couldn't find anything appropriate.
Is there a way for firmware running on the nRF52 to detect the presence of a SEGGER (or other) SWD capable device? I've looked through all the nRF registers but couldn't find anything appropriate.
( ( CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk ) != 0 )
ought to do the trick.
Wow. Thanks very much. I am not up to speed on all that CMSIS offers. Guess I better seek out a tutuorial. There appears to be a ton of stuff there that the Nordic API docs don't discuss.
Stuff like this is purely in the domain of the ARM Cortex-M core and has nothing, really, to do with Nordic.
The best references are ARM's own materials:
And the excellent "Definitive Guide" books by Joseph Yiu:
Specifically, for the question at hand: