<?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>SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23499/sdk13-buttonless-dfu-service-doesnt-change-into-bootloader</link><description>Hi to everybody, 
 I am working with a custom board based on the nrf52832, while trying to integrate to my existing application the DFU functionality I am having problems when I try to change from app to bootloader through Buttonless DFU Service. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Jul 2017 08:53:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23499/sdk13-buttonless-dfu-service-doesnt-change-into-bootloader" /><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92315?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 08:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf459936-cb13-453f-9271-68bd824ddb22</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Great! Happy to hear that everything is working now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92314?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 07:22:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee9162ac-bbe5-466a-b608-d8d5c8974c39</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;I have the WDT reload command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Inside the wait_for_event()&lt;/li&gt;
&lt;li&gt;Inside nrf_dfu_app_continue() [for the bank transfer ]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In both cases the refresh is conditioned to the WDT status:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if(NRF_WDT-&amp;gt;RUNSTATUS){ NRF_WDT-&amp;gt;RR[0] = WDT_RR_RR_Reload; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have also integrated a Timeout using the RTC2 that you mention on this &lt;a href="https://devzone.nordicsemi.com/question/107007/sdk122-secure-dfu-timeout/"&gt;answer&lt;/a&gt; so now it seems everything works perfectly and there is no WDT reset during the DFU transfer and if the configured RTC2 timeout expires, the device reset and start with the application.&lt;/p&gt;
&lt;p&gt;Thanks for the support and if there is any other issue or problem I will come for advice, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92301?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 14:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:585e5be9-f201-403b-b6f7-48bca95051b4</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;As far as I know there is no timeout in the Secure bootloader that causes it to reset if there is no activity. Did you place the &lt;code&gt;NRF_WDT-&amp;gt;RR[0] = WDT_RR_RR_Reload&lt;/code&gt; statement in the &lt;code&gt;wait_for_event()&lt;/code&gt;function? The Secure bootloader is configured to advertise forever with an advertisment interval of 25ms, so the chip should wake-up every 25ms and reload the RR register of the WDT if there is no activity.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92313?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 06:19:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebf9f49b-59e8-42ca-859b-1a936b32ffe1</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;Mi WDT interval is 3s.&lt;/p&gt;
&lt;p&gt;With &amp;quot;NRF_WDT_BEHAVIOUR_RUN_SLEEP&amp;quot; configuration it didnt work, but now I am testing with &amp;quot;NRF_WDT_BEHAVIOUR_PAUSE_SLEEP_HALT&amp;quot; and the bootloader part with the corresponding WDT refresh order &amp;quot;NRF_WDT-&amp;gt;RR[0] = WDT_RR_RR_Reload&amp;quot; it works.&lt;/p&gt;
&lt;p&gt;The problem is that once the bootloader mode is entered and after 5-6 minutes (or something like that) the devices restarts again after no DFu initiation or communication and the application starts again. Is there any timeout or why can be the bootloader being reseted?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92312?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 12:52:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2042970e-8423-4c3a-b6bf-872f00b135d0</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;What kind of WDT interval have you set in the application? Have you placed&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_WDT-&amp;gt;RR[0] = 0x6E524635UL;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;in the &lt;code&gt;wait_for_event()&lt;/code&gt; function in &lt;code&gt;nrf_dfu.c&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92311?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 11:40:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8243705b-0607-4a25-9946-2387b40d5194</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;If the App uses the WDT there is no possibility of reseting the app from WDT because the GPREGRET will be lost.&lt;/p&gt;
&lt;p&gt;I am trying to include WDT support to the secure bootloader using this &lt;a href="https://devzone.nordicsemi.com/question/69951/wdt-triggers-dfu-exit/"&gt;post1&lt;/a&gt; and this other &lt;a href="https://devzone.nordicsemi.com/question/103394/s130-dfu-ble-bootloader-no-timeout/"&gt;post2&lt;/a&gt; but I am still suffering the restart once the bootloader detects it must stays at bootloader DFU.&lt;/p&gt;
&lt;p&gt;Where is the right place to refresh the WDT at the secure bootloader? I am using SDK13.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92310?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 06:57:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97c24fbb-037c-41b5-98a3-d4e250a5dafe</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;OPT2)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set GPREGSET to 0xB1&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Force a WDT reset&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This leads to a restart where the boot loader sees:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 0&amp;gt; :DEB:RESETREAS: 0x00000006.
 0&amp;gt; :DEB:TGPREGRET: 0x00000000.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The app starts normally.&lt;/p&gt;
&lt;p&gt;Right now I have commented sd_softdevice_disable(),  sd_softdevice_vector_table_base_set() and NVIC_ClearPendingIRQ() lines because I read that with setting GPREGRET to 0xB1 and restarting is enough.&lt;/p&gt;
&lt;p&gt;Any help for this issue/problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92309?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 06:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d28a109c-fb8a-487e-b441-4791988b95f4</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;I have tried without success modifying bootloader_start() function:&lt;/p&gt;
&lt;p&gt;OPT1)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set GPREGSET to 0xB1&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NVIC_SystemReset()&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This leads to a restart where the boot loader sees:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 0&amp;gt; :DEB:RESETREAS: 0x00000006.
 0&amp;gt; :DEB:TGPREGRET: 0x000000B1.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but after reaching to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:DEB:Waiting for events
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It restarts once more with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 0&amp;gt; :DEB:RESETREAS: 0x00000006.
 0&amp;gt; :DEB:TGPREGRET: 0x00000000.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So there is no bootloader DFU, the app starts normally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92308?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 13:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ad0ca64-2593-4547-8e25-bbaa85139eed</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;&lt;em&gt;log cont&amp;#39;d ...&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:DEB:------- nrf_dfu_flash_init-------
:DEB:Waiting for events
:INF:Inside main
:DEB:In nrf_bootloader_init
:DEB:In real nrf_dfu_init
:DEB:running nrf_dfu_settings_init
:DEB:Enter nrf_dfu_continue
:DEB:Valid App
:DEB:Enter nrf_dfu_app_is_valid
:DEB:Return true. App was valid
:DEB:Enter nrf_dfu_app_is_valid
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So it seems that during the first restart it detect ok it must stay at bootloader but it restarts once more and this erased the order of staying at bootloader.&lt;/p&gt;
&lt;p&gt;The app is using the watchdog, I will modify the app to restart not by bootloader_start() function. I will use the WDT restart to see if this solves the double reboot.&lt;/p&gt;
&lt;p&gt;Is there any option to force a quick WDT restart or I must let the WDt to expire?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92307?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 12:19:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c33d37a7-6b90-4a74-ba1d-072504e49678</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;I have get the bootloader logs, and once the app is restarting to entre the bootloader this is what i get:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:INF:Inside main
:DEB:In nrf_bootloader_init
:DEB:In real nrf_dfu_init
:DEB:running nrf_dfu_settings_init
:DEB:Enter nrf_dfu_continue
:DEB:Valid App
:DEB:Application sent bootloader request  !!!
:DEB:In nrf_dfu_transports_init
:DEB:num transports: 1
:DEB:vector table: 0x00073000
:DEB:vector table: 0x00073000
:DEB:Error code - sd_softdevice_vector_table_base_set: 0x00000000
:DEB:Before SOFTDEVICE_HANDLER_APPSH_INIT
:DEB:After SOFTDEVICE_HANDLER_APPSH_INIT
:INF:Error code - sd_ble_cfg_set: 0x00000000
:DEB:Enabling softdevice.
SDH:DEB:RAM start at 0x20002060.
:DEB:Softdevice enabled
:DEB:After nrf_dfu_transports_init
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92306?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 12:03:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:312fc76d-0749-4ca5-bb35-3981064abeff</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;I have been testing with debug bootloader.&lt;/p&gt;
&lt;p&gt;I dont know how to debug or see jlink log messages from the bootloader once I program the SD+BL+APP+SETTINGS over nrfjprog.&lt;/p&gt;
&lt;p&gt;In one of my test I have seen how after writing 01 to buttonless DFU characteristic the app reboots and in the logs of the bootloader it sends &amp;quot;Application sent bootloader request&amp;quot;, but it doent stay at bootloader, it runs application.&lt;/p&gt;
&lt;p&gt;Any help in how to debug this situation or any configuration that could be mistaken? Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92305?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 09:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aff11ff7-6e01-4efe-9240-67637cdf09a7</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You should be able to debug the bootloader with out any modifications to the project, could you try to flash the dedicated debug example to your device, i.e. the one found in&lt;code&gt;examples\dfu\bootloader_secure_ble\pca10040_debug&lt;/code&gt; and see if that helps?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92304?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 05:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e24e5880-2957-4966-9d1b-635b7d99480a</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;I can&amp;#39;t debug bootloader neither see the logs through jlink. Is there any tutorial or post about how to enable this? thanks in advance for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92303?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2017 12:44:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae9d73e3-c96a-4f7e-82ae-26fd6a7e6ad1</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Can you debug the bootloader, set a breakpoint in &lt;code&gt;nrf_dfu_enter_check()&lt;/code&gt; in &lt;code&gt;nrf_dfu.c&lt;/code&gt;and verify whether the bootloader reaches this function or not?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 Buttonless DFU Service doesnt change into Bootloader</title><link>https://devzone.nordicsemi.com/thread/92302?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2017 11:44:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e028748-e10d-4251-a0b5-cf72057ce622</guid><dc:creator>dpa</dc:creator><description>&lt;p&gt;After some test I have made, The device is resetting properly with the write of 0x01 into the Buttonless DFU characteristic. And I have also confirmed that the GPREGRET values is set to 0xB1.&lt;/p&gt;
&lt;p&gt;I am resetting the device letting the watchdog to expire because I read in &lt;a href="https://devzone.nordicsemi.com/blogs/685/common-faq-on-dfu/"&gt;section H&lt;/a&gt; that the watchdog continues working after a NVIC_SystemReset() call.&lt;/p&gt;
&lt;p&gt;In any case, it continues restarting without entering bootloader mode, it starts the application.&lt;/p&gt;
&lt;p&gt;Any help about  configuring the secure bootloader example to enable logs through the jlink and continue digging? Any advice to check what can be occuring into the bootloader to skip into the application directly?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>