<?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>How does experimental_ble_app_buttonless_dfu actually work??</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18963/how-does-experimental_ble_app_buttonless_dfu-actually-work</link><description>I&amp;#39;m been analyzing this code for a while now but can&amp;#39;t see how this code actually triggers a switch into the Bootloader mode. There are no references to any resets or the initial entry points to actually starting the DFU process. Can someone please explain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 May 2020 06:05:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18963/how-does-experimental_ble_app_buttonless_dfu-actually-work" /><item><title>RE: How does experimental_ble_app_buttonless_dfu actually work??</title><link>https://devzone.nordicsemi.com/thread/251376?ContentTypeID=1</link><pubDate>Mon, 25 May 2020 06:05:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716a2358-444b-4bbb-a09b-5a0643b9e5e9</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help! &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does experimental_ble_app_buttonless_dfu actually work??</title><link>https://devzone.nordicsemi.com/thread/251361?ContentTypeID=1</link><pubDate>Sun, 24 May 2020 18:11:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7866a0e6-b746-4df6-92fe-86a0097c888a</guid><dc:creator>davege</dc:creator><description>&lt;p&gt;Thanks a lot for your answer Bj&amp;oslash;rn!&lt;/p&gt;
&lt;p&gt;D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does experimental_ble_app_buttonless_dfu actually work??</title><link>https://devzone.nordicsemi.com/thread/251170?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 07:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbfad16a-e9c8-4bb9-a9b5-7562e91c81c7</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Davege,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are correct that the SDK v16.0.0 DFU solution does not use the bootloader settings to signal the bootloader that it should stay in bootloader mode and not jump to the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Instead the GPREGRET register is used, which was the approach used in our legacy DFU solution( SDK v11 or older). There were a couple of SDK versions ( SDK v12.0.0 to SDK v12.2.0) where we were looking at alternative&amp;nbsp;notification mechanisms and the Experimental implementation in SDK v12 is a result of that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the end we ended up choosing the same notification mechanism as we used previously, i.e. use the GPREGRET register,&amp;nbsp; as the experimental versions that used the bootloader settings for this had some drawbacks.&amp;nbsp;&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><item><title>RE: How does experimental_ble_app_buttonless_dfu actually work??</title><link>https://devzone.nordicsemi.com/thread/251145?ContentTypeID=1</link><pubDate>Thu, 21 May 2020 18:23:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e6e39ce-4ffe-4e00-a1c0-10fda8b4bb3b</guid><dc:creator>davege</dc:creator><description>&lt;p&gt;Hi Everyone.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;As far as I can see, the execution flow presented by @bjorn-spockeli is no more holding true for nRF5 SDK 16.0.0.&lt;/p&gt;
&lt;p&gt;The function &lt;em&gt;enter_bootloader()&lt;/em&gt;&amp;nbsp;is not writing the enter_buttonless_dfu variable.&lt;br /&gt;What I see instead is that (for both bonded and unbonded version of the BLE DFU service) at some point there is a call to&amp;nbsp;&lt;em&gt;ble_dfu_buttonless_bootloader_start_finalize&amp;nbsp;&lt;/em&gt;which is setting&amp;nbsp;&lt;em&gt;GPREGRET&amp;nbsp;&lt;/em&gt;register.&lt;br /&gt;&lt;br /&gt;That means that DFU still can work (i.e. transitioning to DFU mode), since register is checked at boot from nrf_bootloader.&lt;/p&gt;
&lt;p&gt;But now I don&amp;#39;t see any usefulness to&amp;nbsp;&lt;em&gt;enter_buttonless_dfu&amp;nbsp;&lt;/em&gt;&lt;span&gt;variable stored in MBR settings.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can someone explain this better? Why did the code had this evolution over time?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;D&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does experimental_ble_app_buttonless_dfu actually work??</title><link>https://devzone.nordicsemi.com/thread/73290?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 13:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02bd177f-6688-4f5b-b207-517ff4dd34e8</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Dave,&lt;/p&gt;
&lt;p&gt;quote from the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_buttonless_dfu.html?resultof=%22%62%75%74%74%6f%6e%6c%65%73%73%22%20%22%64%66%75%22%20"&gt;Experimental: Buttonless DFU Template Application&lt;/a&gt; description on Infocenter&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When notification of DFU control point
characteristic is enabled, and the
value 0x01 is written to it, the
device will disconnect, send the event
BLE_DFU_EVT_ENTERING_BOOTLOADER, and
enter the bootloader.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;So how is this done in the code?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once you have enabled notification of the DFU Control Point characteristic and written 0x01 to the characteristic, the device will enter &lt;code&gt;on_ctrlpt_write()&lt;/code&gt; in &lt;code&gt;ble_dfu.c&lt;/code&gt;. &lt;code&gt;on_ctrlpt_write()&lt;/code&gt; will in turn call &lt;code&gt;enter_bootloader()&lt;/code&gt; which writes the &lt;code&gt;enter_buttonless_dfu&lt;/code&gt; flag in the bootloader settings flash page to &lt;em&gt;&lt;code&gt;true&lt;/code&gt;&lt;/em&gt;. When the flash write is complete the device will enter the &lt;code&gt;flash_callback&lt;/code&gt; which calls &lt;code&gt;sd_ble_gap_disconnect&lt;/code&gt;. When the device has successfully disconnected you will get the &lt;code&gt;BLE_GAP_EVT_DISCONNECTED&lt;/code&gt; event which is propagated to &lt;code&gt;ble_dfu_on_ble_evt&lt;/code&gt; which in turn will call &lt;code&gt;on_disconnect()&lt;/code&gt; in &lt;code&gt;ble_dfu.c&lt;/code&gt; which calls &lt;code&gt;NVIC_SystemReset();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The device will then reset and execution will start in the bootloader, which checks if the &lt;code&gt;enter_buttonless_dfu&lt;/code&gt; flag is set to true. If it is, then the device will enter bootloader mode.&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>