<?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>Debugger does now longer handle breakpoint after watchdog reset.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78173/debugger-does-now-longer-handle-breakpoint-after-watchdog-reset</link><description>Hi 
 I play with watchdog. 
 After a watchdog reset the debugger does no longer stop on a breakpoint or generate a hardfault on a __BKPT() 
 How can I config the Chip to handle breakpoints correct after watchdog reset?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Aug 2021 15:28:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78173/debugger-does-now-longer-handle-breakpoint-after-watchdog-reset" /><item><title>RE: Debugger does now longer handle breakpoint after watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/323386?ContentTypeID=1</link><pubDate>Wed, 04 Aug 2021 15:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0661c8f-7d53-4b5a-9fdf-92f16132587c</guid><dc:creator>Canastra</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So I see there is now way to handle breakpoints after a reset.&lt;/p&gt;
&lt;p&gt;Today I test the reset button and it is the same behavior.&lt;/p&gt;
&lt;p&gt;No halt on breakpoint and hardfault on __BKPT()&lt;/p&gt;
&lt;p&gt;I print out&amp;nbsp;DCB-&amp;gt;DHCSR at startup.&lt;/p&gt;
&lt;p&gt;with working debugger the value is #######1.&lt;/p&gt;
&lt;p&gt;After reset (pin or dog)&amp;nbsp;&lt;span&gt;the value is #######0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And only a debugger can modify this bit.&lt;/p&gt;
&lt;p&gt;Thanks for support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugger does now longer handle breakpoint after watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/323230?ContentTypeID=1</link><pubDate>Wed, 04 Aug 2021 07:47:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdd21d7f-2efe-41e4-a6e6-7ec86130ad6f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Canastra"]&lt;p&gt;Hi H&lt;span&gt;åkon&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SES is still in debugging mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The target handle a reset from the debugger correct.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can I&amp;nbsp;re-attach the debugger in SES?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can this be done automatically?&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&amp;nbsp;Yes, the debug session is still open, but it goes into the running state after a wdt reset has occurred. If you halt the cpu, you can see that it has faulted (set CONFIG_RESET_ON_FATAL_ERROR=n to enable blocking assertions/faults), but you&amp;#39;re not able to connect in such a time that the bpkt instruction is executed as you intend.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugger does now longer handle breakpoint after watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/323149?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 14:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98ac44d7-12a9-46cb-823a-d27dc726636b</guid><dc:creator>Canastra</dc:creator><description>&lt;p&gt;Hi H&lt;span&gt;&amp;aring;kon&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SES is still in debugging mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The target handle a reset from the debugger correct.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can I&amp;nbsp;re-attach the debugger in SES?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can this be done automatically?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugger does now longer handle breakpoint after watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/323144?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 14:21:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44f75354-f206-413c-ad01-f1b37aad8e84</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A __BKPT() instruction will cause a fault when no debugger (or semi-hosting not enabled) is connected:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.arm.com/developer/ip-products/processors/f/cortex-m-forum/13615/what-is-the-behavior-for-a-bkpt-instruction-in-a-hardfault-handler"&gt;https://community.arm.com/developer/ip-products/processors/f/cortex-m-forum/13615/what-is-the-behavior-for-a-bkpt-instruction-in-a-hardfault-handler&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this case, the wdt reset allows the device to run, and you need to re-attach the debugger.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugger does now longer handle breakpoint after watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/323117?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 13:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6376db09-b1b1-4d1c-b599-dca2a936cc0c</guid><dc:creator>Canastra</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I use SES an nRF9160DK&lt;/p&gt;
&lt;p&gt;Attached is my project.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5707.buttonWdt.zip"&gt;devzone.nordicsemi.com/.../5707.buttonWdt.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The watchdog is refreshed until button1 is pressed.&lt;/p&gt;
&lt;p&gt;After Watchdog timeout a reset is generated and then __BKPT() is called.&lt;/p&gt;
&lt;p&gt;Then the debugger doesn&amp;#39;t stop and a Hardfault is generated.&lt;/p&gt;
&lt;p&gt;The Output from the consol is attached&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ZOC20210803.LOG"&gt;devzone.nordicsemi.com/.../ZOC20210803.LOG&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On line 47 is a&amp;nbsp;RESETPIN&lt;/p&gt;
&lt;p&gt;On line 100 is a DOG&lt;/p&gt;
&lt;p&gt;On line 159 is SREQ&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When I set a breakpoint on line 87 nothing happends after DOG Reset&lt;/p&gt;
&lt;p&gt;When I remove __BKPT() no hardfault is generated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugger does now longer handle breakpoint after watchdog reset.</title><link>https://devzone.nordicsemi.com/thread/323092?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 12:20:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0704fa8a-cd0a-4a59-91bc-84a2e01f37df</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which IDE/debugger do you use? usually the debugger is able to catch a reset, but not normally re-attach to the process properly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]generate a hardfault on a __BKPT()[/quote]
&lt;p&gt;&amp;nbsp;Do you see a fault when the device resets? This could be a timing issue in your application (for instance, when init&amp;#39;ing an external device or similar)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>