<?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>Setting watchpoint on nRF52832DK with GDB</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29591/setting-watchpoint-on-nrf52832dk-with-gdb</link><description>Hi, 
 I&amp;#39;ve recently come across a problem where in some cases my device&amp;#39;s memory gets trashed. 
 Ideally I&amp;#39;d be able to set a watchpoint on a memory location so that I could see what the offending code is - and it would appear that the nRF52832 has</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jan 2018 08:07:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29591/setting-watchpoint-on-nrf52832dk-with-gdb" /><item><title>RE: Setting watchpoint on nRF52832DK with GDB</title><link>https://devzone.nordicsemi.com/thread/117587?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 08:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4fe8663-a5e2-45b4-8eff-3f6be4696c1f</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;thanks! Sorry - I&amp;#39;d expected &amp;#39;convert to answer&amp;#39; to pull the comment and all comments after it. This is great news - so the WDT gets set by softdevice init, so I could maybe add an &lt;code&gt;#ifdef DEBUG&lt;/code&gt; macro in my code that removed it for debug builds - or could just do it in GDB manually.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting watchpoint on nRF52832DK with GDB</title><link>https://devzone.nordicsemi.com/thread/117586?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 06:54:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:799c28e8-e13c-4e33-a3a7-3ef8fbe1e68a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Gordon! Forgot about this feature on nRF52, but it has the option to pause the WDT when the CPU is halted. This is field C (bit 3) in the NRF_WDT-&amp;gt;CONFIG register, and the reset value is &amp;#39;0&amp;#39;, so make sure this field is set to &amp;#39;0&amp;#39;, and the WDT shouldn&amp;#39;t cause any issues when debugging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting watchpoint on nRF52832DK with GDB</title><link>https://devzone.nordicsemi.com/thread/117588?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 09:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f846632-cf83-4bf7-80b4-f0a0bcd77d24</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Hi, thanks - I tried awatch before and it said &lt;code&gt;Expression cannot be implemented with read/access watchpoint.&lt;/code&gt;. I&amp;#39;ve actually just tried this again and found that &lt;code&gt;awatch array[5]&lt;/code&gt; and &lt;code&gt;awatch &amp;amp;array[5]&lt;/code&gt; fails, but &lt;code&gt;awatch array&lt;/code&gt; works, as does &lt;code&gt;awatch *(uint32_t*)0x20003898&lt;/code&gt; so I guess I was just using it wrong - thanks! Interestingly when I use normal &lt;code&gt;watch&lt;/code&gt; with the different expressions it says &lt;code&gt;Hardware watchpoint 11&lt;/code&gt; as opposed to &lt;code&gt;Watchpoint 11&lt;/code&gt; when I manually specify the address. Do you have a link for info on disabling the WDT in GDB? That always made things very painful and I assumed it wasn&amp;#39;t something I could do anything about.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting watchpoint on nRF52832DK with GDB</title><link>https://devzone.nordicsemi.com/thread/117585?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 07:50:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6290c9e1-4686-464b-b385-334d2b755403</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Good morning Gordon,&lt;/p&gt;
&lt;p&gt;Did you try to use &lt;code&gt;awatch &amp;lt;var&amp;gt;&lt;/code&gt; instead of &lt;code&gt;watch &amp;lt;var&amp;gt;&lt;/code&gt;?
I&amp;#39;d recommend to disable the WDT when debugging, as the debugger will halt the CPU, but not any peripherals in the background. This will cause the WDT to reset your system after the bkpt has reached.&lt;/p&gt;
&lt;p&gt;Cheers,
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>