Hi,
I would like to generate messages based on whether the nrf52840 SWD is connected (through j-link and Segger Embedded Studio).
Is there a way to query this?
Thanks,
Daniel
Hi,
I would like to generate messages based on whether the nrf52840 SWD is connected (through j-link and Segger Embedded Studio).
Is there a way to query this?
Thanks,
Daniel
The usual way is to check the DEBUGEN bit in DHCSR (the Debug Halting Control and Status Register)
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html
Note that this will not tell you the type of debug probe (eg, JLink), nor the IDE (eg, SES).
EDIT
Above link is for Cortex-M3.
M4 link: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html
The usual way is to check the DEBUGEN bit in DHCSR (the Debug Halting Control and Status Register)
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html
Note that this will not tell you the type of debug probe (eg, JLink), nor the IDE (eg, SES).
EDIT
Above link is for Cortex-M3.
M4 link: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html
Thanks! Daniel
If that resolves the issue, please Verify the answer: