<?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>Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13161/is-there-a-way-to-know-if-debug-mode-is-enabled</link><description>I don&amp;#39;t find the information in the nRF51822 documentations and in this forum. 
 How can I know that? Is there some register to check, or some hints to know that debug mode is activated? 
 I am using nRF51822, softdevice S110, SDK10. 
 Long story </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Apr 2016 05:18:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13161/is-there-a-way-to-know-if-debug-mode-is-enabled" /><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50168?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 05:18:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d6a3fcc-4437-48a4-8a24-7182ecf8e4f9</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Yes it&amp;#39;s documented - look at section 11.1.3 &amp;quot;Resuming normal mode&amp;quot; in the nRF51 series reference manual.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50167?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 05:16:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f998c35d-2bb6-462d-892c-030525f1524c</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;Thank you for your answer. Is this reset sequence documented? I found this &lt;a href="https://devzone.nordicsemi.com/question/4680/resetting-nrf51822-in-debug-mode"&gt;thread&lt;/a&gt; : &lt;em&gt;NRF_POWER-&amp;gt;RESET register (at 0x40000544) to enable pin reset while in debug mode, and then toggle the reset pin.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Is it the suggestion you have written in your answer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50173?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 01:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49ff44c7-0601-48b0-874b-e258b13baef9</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Ah right, i forgot about nrf52. Thanks for explanation!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50172?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 01:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdc25def-3fb6-44af-bf60-2c37d27fc986</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;The person in that thread uses the nRF52, recently at least, so I&amp;#39;m pretty sure that solution is M4 only, not M0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50171?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 01:30:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ac67b27-3c72-487e-9fb3-724ca5090a32</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Yes, I was bit confused because i could not find information about it&amp;#39;s implementation in M0. However I though that might work because in the linked thread OP marked this as a solution. Didn&amp;#39;t check that myself though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50170?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 01:18:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78d93599-8065-40f0-b35a-64bc4952cac5</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;That&amp;#39;s not defined for the Cortex M0 and the OP stated nrf51. On the M0, memory mapping of the debug registers is Implementation Defined and as far as I know, the nrf51 implementation doesn&amp;#39;t map them. If it did you could use bit 0 of DHCSR to tell if debug is enbled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50169?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 00:58:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e411982-0b9f-4f56-a8fc-95a19059db92</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/71512/knowing-that-a-swd-probe-is-connected/#71514"&gt;This&lt;/a&gt; may be helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to know if debug mode is enabled?</title><link>https://devzone.nordicsemi.com/thread/50166?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 00:28:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffc17434-d9bb-42a0-9a63-98e6097ded52</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;The debug registers in the Cortex M0 are only accessible over the DAP port, not via memory reads, so you can&amp;#39;t tell if the processor is in debug mode from code.&lt;/p&gt;
&lt;p&gt;The nrf51 does have a reset sequence which disables debug mode, can you use that? You set the reset flag in the power register and then have your debugger hold the SWDCLK and SWDIO lines low to hard reset the chip. As long as the debugger doesn&amp;#39;t re-connect, you&amp;#39;re now reset and not in debug mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>