<?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>S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17795/s130-dfu-ble-bootloader-no-timeout</link><description>Hello, 
 As far as I understand previous versions of DFU BLE bootloader implemented a timeout so if DFU is not being used and an app is present it will run after a few time. 
 I can&amp;#39;t see anything on the latest SDK (12). Can&amp;#39;t exit from DFU unless I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Mar 2017 13:33:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17795/s130-dfu-ble-bootloader-no-timeout" /><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68594?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2017 13:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03f6251d-3827-41d8-b8c9-5d90c5f805f4</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@shayo: The files in this answer is specific to SDK v12.x.x, I think you should be able to feed the watchdog in the wait_for_events function in the bootloader in SDK v11.0.0 and older.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68592?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2017 02:03:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c681d8ba-cbf7-427a-ba04-deb944113312</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;Shay,  We we were talking about SDK12.&lt;/p&gt;
&lt;p&gt;Darren&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68593?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2017 12:02:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bd2ea33-0546-49ba-ba8f-9fbea6cebfda</guid><dc:creator>Shay Ohayon</dc:creator><description>&lt;p&gt;Bjorn, I can&amp;#39;t find the file (nrf_dfu.c) you are mentioning in SDK 10/11. Which SDK were you referring to? 12?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68591?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2017 08:31:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c50d12e-e4be-4a8c-9bf3-2c997352b09a</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@dave_couling : I agree that the bootloader should timeout if there is no &amp;quot;DFU Activity&amp;quot; to avoid excessive current consumption. My guess is that this was unintentionally left out when the bootloader was redesigned in the SDK v11.0.0/SKD v12.0.0 transition. I&amp;#39;ve reported this internally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68590?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2017 19:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00e035af-8b38-4d23-9119-fc9fea45fef8</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;Why would Nordic remove the DFU Transfer Timeout (previously an app_timer) that was present in the previous Bootloaders?  This should be a default supervisor timeout of the process to prevent erroneous power consumption.  Also adding a WD is not trivial because it would need to be supported both in the Bootloader annd Application, as it persists over soft-resets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68589?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 11:24:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:678d4b88-3d9f-4f56-83ff-266be88d75ba</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68588?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 17:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9cd3a2d-5084-4757-8237-c8d732bf4acb</guid><dc:creator>Mario Ribeiro</dc:creator><description>&lt;p&gt;Great! I was already trying something like that using an &amp;quot;app_timer&amp;quot; which is overkill. WDF does the job wonderfuly. I also added an op code do Control Point characteristic so I can remotely reset the nRF51 while in DFU mode. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 DFU BLE Bootloader: no timeout?</title><link>https://devzone.nordicsemi.com/thread/68587?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 13:28:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb0dc2ab-59c1-4e65-b500-3eb004a92ea8</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;My suggestion would be to start the watchdog timer(WDT) once you enter &lt;code&gt;nrf_dfu_init()&lt;/code&gt; in &lt;code&gt;nrf_dfu.c&lt;/code&gt; and then feed it everytime the bootloader handles requests from the DFU controller. Configure and start the WDT by adding the following code snippet to &lt;code&gt;nrf_dfu_init()&lt;/code&gt; after the &lt;code&gt;if(enter_bootloader_mode != 0 || !nrf_dfu_app_is_valid())&lt;/code&gt; 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            = 3932159;                                              // Timeout set to 120 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
NRF_WDT-&amp;gt;RR[0] = WDT_RR_RR_Reload; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have also attached the main.c and dfu_req_handling.c files below which include the snippets.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_dfu.c"&gt;nrf_dfu.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dfu_5F00_req_5F00_handling.c"&gt;dfu_req_handling.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>