<?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>Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58138/breakpoint-and-reset-in-softdevice-addresses-0xa60-and-0xa80</link><description>Hi, 
 
 Our application sometimes hits a breakpoint in SoftDevice at either address 0xA60 or (less often) 0xA80. 
 Based on this post https://devzone.nordicsemi.com/f/nordic-q-a/9622/application-debug-with-softdevice I believe that it might be an assert</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Mar 2020 08:02:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58138/breakpoint-and-reset-in-softdevice-addresses-0xa60-and-0xa80" /><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/239652?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 08:02:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:812195eb-4cbd-421b-92e4-6f1f25b899b0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It&amp;#39;s not possible to read the WD counter, unfortunately.&amp;nbsp; It starts over again when you reload it.&lt;/p&gt;
[quote user="cdunster"]This makes it seem like either the watchdog is not being kicked properly or as you previously said it is incrementing in the background building up overtime getting close to the overflow value, then when the system wakes and performs it&amp;#39;s actions this CPU usage is long enough that it pushes the watchdog to overflow before it can idle and get kicked.[/quote]
&lt;p&gt;&amp;nbsp;What&amp;#39;s the WDT_CONFIG_BEHAVIOUR configured to in your sdk_config.h file? &amp;quot;&amp;nbsp;Run in SLEEP&amp;quot; would make it count continuously anyway.&lt;/p&gt;
[quote user="cdunster"]By reducing the watchdog time to about 10ms instead of 3 seconds then we can see the same problem but much quicker. With this quicker watchdog we see that the system can work fine indefinitely, connecting and disconnecting phones; sending commands; etc., but then if we disconnect the phones, leaving the system to idle for about a minute, and afterwards we connect a single phone then the watchdog kicks in and reboots the system.[/quote]
&lt;p&gt;Assume you had to increase the frequency of your reloading task to make 10 ms work? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/239514?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 11:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79996722-1616-47b0-a1fb-a2552bcb6500</guid><dc:creator>PRvdO</dc:creator><description>&lt;p&gt;We have done power profiling and it seems that the CPU usage does not change at the time we see the issue. If it was CPU usage that it would likely happen every time and not just after a prolonged idle period.&lt;/p&gt;
&lt;p&gt;By reducing the watchdog time to about 10ms instead of 3 seconds then we can see the same problem but much quicker. With this quicker watchdog we see that the system can work fine indefinitely, connecting and disconnecting phones; sending commands; etc., but then if we disconnect the phones, leaving the system to idle for about a minute, and afterwards we connect a single phone then the watchdog kicks in and reboots the system.&lt;/p&gt;
&lt;p&gt;This makes it seem like either the watchdog is not being kicked properly or as you previously said it is incrementing in the background building up overtime getting close to the overflow value, then when the system wakes and performs it&amp;#39;s actions this CPU usage is long enough that it pushes the watchdog to overflow before it can idle and get kicked.&lt;/p&gt;
&lt;p&gt;We use the nrfx_wdt_channel_feed(m_channel_id); function to kick the watchdog, is this correct?&lt;/p&gt;
&lt;p&gt;Is it possible to print the current watchdog timer value? So that we can see if it does actually increase over time and that it is reloaded correctly.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/239167?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 14:42:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f67997c-10ad-4e27-b0f6-fb0f3f090499</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;So I&amp;#39;ve discussed this with a colleague who is experienced with Freertos and he thought the problem could be that the BLE task is not yielding to other thread responsible for feeding the WD. Have you tried to do any profiling to see if there&amp;#39;s heavy CPU usage around the time a&amp;nbsp; connection is established?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/239037?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 10:05:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40c7ecd4-e98c-44e7-bff8-91fcebb02592</guid><dc:creator>PRvdO</dc:creator><description>&lt;p&gt;This was our worry too but, strangely, we can reduce the failure rate but we are struggling to increase the failure rate. We have tested it a few times with the watchdog timeout increased to 10 seconds (from 3 seconds) and the system seems to work without crashing and also doesn&amp;#39;t hang anywhere. We have also tried to decrease the watchdog to 1 second but the failure stays the same.&lt;/p&gt;
&lt;p&gt;Is it possible to print the current value of the watchdog timer so that we can see if it is being fed and if it is incrementing in the background as you said it might be.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/238856?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 14:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:975560aa-8f1a-4487-8cbf-7071fdab5f99</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;In the failing cases, maybe the WD is already close to&amp;nbsp;expiring when you get the connection event, and the code responsible for reloading is being delayed enough by that to cause a reset. Have you noticed any impact on failure rate if you increase the timeout and or frequency of the periodic tasks that reload the WD?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/238263?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 11:56:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb42adfe-0624-42b0-82d6-912f2941ae9b</guid><dc:creator>PRvdO</dc:creator><description>&lt;p&gt;It does seem that it is a genuine watchdog reset but without the watchdog the system runs fine so it is not stuck but instead it seems that a task is just taking too long meaning the watchdog is not kicked.&lt;/p&gt;
&lt;p&gt;The weird thing is still the fact that it only happens after a phone connects via BLE and the system has been on for a few hours and not every time a phone connects, even though the same tasks run.&lt;/p&gt;
&lt;p&gt;I was wondering if it is the fact you mentioned about the watchdog incrementing in the background so I reduced the watchdog time and let it run thinking it would keep incrementing until it overflowed and caused a reset, but it didn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;So, it does seem like it is a problem in our code where something takes too long which we can fix. However, I still don&amp;#39;t understand why it only happens after some time, any ideas?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/237805?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 14:26:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e837ef7b-4538-41e9-8c70-628517f40009</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Ok, good to know that it is being reloaded. I understand it&amp;#39;s time-consuming to run this test, but have you tried to extend the WD timeout as well? As for the CPU halting at 0xA80, I recently found out that the debugger will halt the CPU on reset if the &amp;quot;reset&amp;quot; breakpoint is enabled (you can see this breakpoint is disabled in the first screenshot I posted here). The problem is then to find out what caused it to reset in the first place. Maybe it&amp;#39;s always by the WD timing out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Has this never happened with the WDT disabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/237519?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 15:32:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4b38b92-578e-44aa-a22b-6c7b4022477d</guid><dc:creator>PRvdO</dc:creator><description>&lt;p&gt;I believe the WDT is being fed as we are using FreeRTOS and we have some periodic tasks which run during this period. Currently, the watchdog itself is actually being fed by a periodic task but with it&amp;#39;s priority set to the same level as idle.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s good to know about it being incremented in the background though, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/237482?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 14:17:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de1375e3-89e0-4af5-8692-c5beeecdb2c3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Is the WD being fed during this idle period? Note that Softdevice tasks such as advertisement events are run in the background without waking the application and will cause the WDT counter to be incremented even if you have enabled the pause on sleep option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/237448?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 13:11:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc10033b-b48d-41d3-9d76-fc5f63144c21</guid><dc:creator>PRvdO</dc:creator><description>&lt;p&gt;So, it seems like the watchdog is the cause of the crash. However, this crash only occurs if the system is left idle for hours and then we connect a phone via BLE. We have repeated the test but with the watchdog disabled and the system runs fine (we were hoping that it would get stuck in a loop and we could find it without the Watchdog but it just keeps running).&lt;/p&gt;
&lt;p&gt;Are you aware of anything that might change after a long period of time? We can leave the system for days and it works fine but as soon as we connect a phone it reboots.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/No-outside-crash-registers.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/236569?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 13:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9c53630-fee6-4431-a8ab-12388ef3af4f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The MBR reset handler starts at 0xA80 so it looks like it just came out of a system reset. I suggest you check RESETREAS register to find out what the reset source was (&lt;a title="  RESETREAS  " 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;RESETREAS&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c66709f8f50544a4a0131fcc0e8e4a35/pastedimage1582724335358v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/236491?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 10:53:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baf42b80-68c3-4f08-88d4-0e43522c1627</guid><dc:creator>PRvdO</dc:creator><description>&lt;p&gt;We are using SoftDevice 7.0.1&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4-slightly-larger-dissasembly-csreen.png" /&gt;&lt;/p&gt;
&lt;p&gt;This is a screenshot of the problem. As you can see we are stopped at 0xA80 and there is noting on the Call Stack. The ISR register is 0.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/235748?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 14:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec069693-dc1a-42de-a219-3c9ae8b6e2f8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I would have to check that. What Softdevice version are you using?&lt;/p&gt;
&lt;p&gt;Maybe you can check and see what the ISR number is when you hit the breakpoint at 0xA80. As you can see from the screenshot below, the ISR number is 3 (=hardfault) when the program halts at 0xa60.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c66709f8f50544a4a0131fcc0e8e4a35/pastedimage1582295200226v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/235732?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 13:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0d48d7e-58bd-4e26-84cf-031927967b7f</guid><dc:creator>PRvdO</dc:creator><description>&lt;p&gt;Thanks for the quick response.&lt;/p&gt;
&lt;p&gt;Do you know what is at address 0xA80?&lt;/p&gt;
&lt;p&gt;The 0xA60 reset only seems to happen after 3 hours so it will take a while to reproduce, in the mean time, the 0xA80 reset happens when multiple BLE devices are connected. Each connected device sends data over BLE which is forwarded via the UART so could it be to do with either of those?&lt;br /&gt;&lt;br /&gt;Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breakpoint and reset in SoftDevice addresses 0xA60 and 0xA80</title><link>https://devzone.nordicsemi.com/thread/235709?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 12:32:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1f71f18-d422-4e08-a191-d5e4391ec40c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;0xA60 is where the hardfault handler is located in the MBR. Please disable the breakpoint on hardfault as shown by the screenshot below (assuming you use SES) and check if the program enters the hardfault handler in your application or if it ends up in the app error handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c66709f8f50544a4a0131fcc0e8e4a35/pastedimage1582288007688v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>