<?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>S140 bootloader,no timeout?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22224/s140-bootloader-no-timeout</link><description>Hi, 
 I use the bootloader in the SDK V13.0, I found that no timeout as the SDK v12.x. However, I have added the WDT to the bootloader refer to the link link text 
it still stay at the bootloader and never switch to the application from bootloader when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 May 2017 12:12:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22224/s140-bootloader-no-timeout" /><item><title>RE: S140 bootloader,no timeout?</title><link>https://devzone.nordicsemi.com/thread/87325?ContentTypeID=1</link><pubDate>Fri, 26 May 2017 12:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6d1044c-cade-4264-826e-7ff3656be9bd</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;How are you generating the bootloader settings hex? Can you post the nrfutil command and the output in the terminal? Also can you debug your bootloader project after you have flashed the combined hex file and check if you reach the &lt;code&gt;if (nrf_dfu_app_is_valid())&lt;/code&gt; statement( line 197) in nrf_dfu.c in the function nrf_dfu_init(). If so what does nrf_dfu_app_is_valid() return?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140 bootloader,no timeout?</title><link>https://devzone.nordicsemi.com/thread/87324?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 08:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11d896cc-f9b3-4345-9015-b962a7b52717</guid><dc:creator>Alice</dc:creator><description>&lt;p&gt;I think there is no problem for the WDT setting. Because the device would reset when the WDT timout occurs after I do OTA successful.&lt;/p&gt;
&lt;p&gt;I merge the four files(applicaiton,bootloader,softdevice,bootloader setting) into one file then program to the chip, I found that it stays at the bootloader and broadcast as &amp;quot;DfuTarg&amp;quot;, not the application.At this time, if I do OTA and then close bluetooth function or close the APP to make a bad condition, bootloader wouldn&amp;#39;t timeout even if I wait a long time. However, if I do OTA successfully, at this time it will run the application, not bootloader. Then I do OTA again and make a bad condition to test WDT, I found that the device reset when the WDT timout occurs.&lt;/p&gt;
&lt;p&gt;So it seems that I have found something. After I program merged file, it should run the application, not the bootloader. In fact, it runs the bootloader. So I think the main problem is how to make it run application when program it firstly. I use the same way for SDK V12.x, it wouldn&amp;#39;t meet the problem and it would run the application first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140 bootloader,no timeout?</title><link>https://devzone.nordicsemi.com/thread/87323?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 07:28:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01b7246c-1367-41f2-a278-4fee92f1cfc3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;No, I am not aware of any issues with the WDT, it is identical to that of the nRF52832.
Could you try to add the following line before you call the &lt;code&gt;NRF_WDT-&amp;gt;TASKS_START = 1;&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_WDT-&amp;gt;INTENSET = 1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If that does not solve the issue, then please you debug the bootloader and use the peripheral viewer to check the RUNSTATUS,INTENSET,CONFIG and RREN registers of the WDT to verify that the WDT is running, the TIMEOUT interrupt is enabled, it is configured and that the reload register is enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140 bootloader,no timeout?</title><link>https://devzone.nordicsemi.com/thread/87322?ContentTypeID=1</link><pubDate>Mon, 22 May 2017 08:17:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:113af27e-786e-43e4-a064-d865fa5ef997</guid><dc:creator>Alice</dc:creator><description>&lt;p&gt;@Bjørn Spockeli  No, it seems that the WDT doesn&amp;#39;t occurs timeout.
I do as follow:
code snippet to nrf_dfu_init() after the if(enter_bootloader_mode != 0 || !nrf_dfu_app_is_valid()) statment&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;			//Configure WDT.
    NRF_WDT-&amp;gt;CONFIG         = (WDT_CONFIG_SLEEP_Run &amp;lt;&amp;lt; WDT_CONFIG_SLEEP_Pos);       // Configure WDT to run when CPU is asleep
    NRF_WDT-&amp;gt;CRV            = 1966079;                                              // Timeout set to 60 seconds, timeout[s] = (CRV+1)/32768
    NRF_WDT-&amp;gt;RREN           = WDT_RREN_RR0_Enabled &amp;lt;&amp;lt; WDT_RREN_RR0_Pos;             // Enable the RR[0] reload register
    NRF_WDT-&amp;gt;TASKS_START    = 1;                                                    // Start the WDT            
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then add the snippet below to the nrf_dfu_req_handler_on_req() function in dfu_req_handling.c&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Reload the WDTs RR[0] reload register
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;NRF_WDT-&amp;gt;RR[0] = WDT_RR_RR_Reload;&lt;/p&gt;
&lt;p&gt;Is there any problem for the WDT?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140 bootloader,no timeout?</title><link>https://devzone.nordicsemi.com/thread/87321?ContentTypeID=1</link><pubDate>Mon, 22 May 2017 08:08:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e0902a8-e131-482a-ba6f-37504e7cb54f</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@alice: Does the device reset when the WDT timout occurs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>