<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SWD connection status</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41791/swd-connection-status</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jul 2019 11:16:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41791/swd-connection-status" /><item><title>RE: SWD connection status</title><link>https://devzone.nordicsemi.com/thread/198132?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 11:16:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21670413-456f-49c2-b872-fabcb5c5f204</guid><dc:creator>Bruno Randolf</dc:creator><description>&lt;p&gt;As said before, but here is the relevant code fragment:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (CoreDebug-&amp;gt;DHCSR &amp;amp; CoreDebug_DHCSR_C_DEBUGEN_Msk)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWD connection status</title><link>https://devzone.nordicsemi.com/thread/162638?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 11:14:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61de2d5c-1ba0-4103-b7e8-e1b190befa55</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;If that resolves the issue, please Verify the answer:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7183._5F00_Verify_2D00_answer_2D00_nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWD connection status</title><link>https://devzone.nordicsemi.com/thread/162631?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 10:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68864e9a-a25c-48d5-bc02-d689ceafc17a</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Thanks! Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWD connection status</title><link>https://devzone.nordicsemi.com/thread/162623?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 10:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f78db7a-bda8-449b-bbd9-d835c424041d</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The usual way is to&amp;nbsp;&lt;span class="uiOutputText" dir="ltr"&gt;check the DEBUGEN bit in DHCSR (the Debug Halting Control and Status Register)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="cuf-url forceOutputURL" title="" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note that this will not tell you the type of debug probe (eg, JLink), nor the IDE (eg, SES).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT&lt;/p&gt;
&lt;p&gt;Above link is for Cortex-M3.&lt;/p&gt;
&lt;p&gt;M4 link:&amp;nbsp;&lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>