<?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>Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76221/keil-doesnt-stop-on-softreset-watchdog</link><description>Hello, 
 
 Im trying to debug my fw using Keil, its running in debug mode and I have RTT printouts, but once softreset occurs debugger doesnt halt it. Device reboots and starts working again. Any idea how I can make it halt ? Or any other way to understand</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Jun 2021 12:11:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76221/keil-doesnt-stop-on-softreset-watchdog" /><item><title>RE: Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/thread/314692?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 12:11:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb949ece-0b7f-4826-9836-c185874a63b1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;That is not unsurprising, but it is always good to rule out some things. So seemingly everything is OK, but you no longer get RTT logging? Can&amp;nbsp; you share the parts of your code that initialize and process logs, and the logging related part of your sdk_config.h?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/thread/314688?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 12:04:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:111894cd-7ca5-435b-a2fa-ef0fd55fd81d</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;Einar, there is something else going on actually. Im now running it without Keil and just with RTT printouts. At some point printout stops, but I know device isnt hanging because I still can connect to it via BLE NRF Connect. Somehow RTT hangs and if I reconnect printouts dont resume.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/thread/314675?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 11:29:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9df4d41c-04ae-455b-a927-4ca14a498b63</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The register is cumulative, so you need to clear it after reading it. If not you cannot know which bit apply to the latest reset. See &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_8_2#register.RESETREAS"&gt;doc&lt;/a&gt;. Also, make sure to consider &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_136.html"&gt;erratum 136&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/thread/314673?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 11:24:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:942613b6-3fca-4a71-bb88-51f6126b063f</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;Hi Einar, RESETREAS is set to 6, is that a valid situation to have both soft reset and watchdog at the same time?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/thread/314670?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 11:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42468261-3c2e-457d-a55a-be033bc911e6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not sure what is going on, but with DEBUG defined you will catch any APP_ERROR_CHECK&amp;#39;s that detect an error. It does not mean that any and all errors will be detected by this approach, though. There is no generic way to make the debugger halt on any error as an error could be anything.&lt;/p&gt;
&lt;p&gt;If the thing is that you want to detect if a reset is caused by a watchdog or a soft reset, then you can either disable the watchdog to rule that out, or check the RESETREAS register. If you want to know if a soft reset occurs, then you can set a breakpoint on all calls to&amp;nbsp;NVIC_SystemReset().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/thread/314660?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 10:25:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:596bc2ae-9ffe-4a34-a4b9-51b493611cba</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;have a breakpoint at the start of main and it does stop at this breakpoint at start. but when it hangs id expect it to be stopped by DEBUG defines and it doesnt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil doesnt stop on softreset/watchdog</title><link>https://devzone.nordicsemi.com/thread/314658?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 10:21:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25a46339-4963-499a-81d8-3b540e2a82c7</guid><dc:creator>awneil</dc:creator><description>[quote userid="2294" url="~/f/nordic-q-a/76221/keil-doesnt-stop-on-softreset-watchdog"]Any idea how I can make it halt ?[/quote]
&lt;p&gt;Put a breakpoint at the start of main() ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>