<?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>buttonless DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62776/buttonless-dfu</link><description>Hi ! 
 I&amp;#39;m setting up buttonless DFU on an nrf52832. I&amp;#39;m using SES on windows. 
 I found two ways of performing it, one in the forum and another in the infocenter. 
 The first way is using those command found on the Dev Zone that are supposed to restart</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jun 2020 08:48:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62776/buttonless-dfu" /><item><title>RE: buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/256610?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2020 08:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06260fd4-c9f7-47f1-8e6f-c17639f83cfc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What nRF Connect for Desktop version do you use, and how do you perform the DFU with the application image? Do you use the same image as you use on the phone? And are you sure the bootloader will accept the FW at this point in time? Perhaps you already updated the FW from the phone?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have a few questions:&lt;/p&gt;
&lt;p&gt;1. How you generate the dfu application image?&lt;/p&gt;
&lt;p&gt;2. Do you press the DFU image directly, or do you write to the buttonless service first?&lt;/p&gt;
&lt;p&gt;3. Did you do any changes to the bootloader project? (applied bonding requirements? Other changes?)&lt;/p&gt;
&lt;p&gt;4. What HW are you running on?&lt;/p&gt;
&lt;p&gt;5. Have you tried the pca10040_s132_ble_debug project? Does the log from the bootloader project say anything when this issue occurs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/256281?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 20:51:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:612a8538-1ec7-4091-8f8a-bc0ecc3eb793</guid><dc:creator>JayLynkz</dc:creator><description>&lt;p&gt;Hi Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was able to perform buttonless DFU by using the example found in&amp;nbsp;SDK16.0.0\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040\s132\ses&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am now at the stage of implementing the content of this example in my main app.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The only problem is that nrf Connect on windows never succed the DFU, while nrfToolbox on my iPhone with the exact same .zip file works just fine..&lt;/p&gt;
&lt;p&gt;I get this error message on windows :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/dfuerror.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your support&lt;/p&gt;
&lt;p&gt;Jerome&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/256186?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 12:45:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3c9eb4d-872b-4600-8022-3d3c5b616fb6</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Setting it to 1 would be done from the central. Try to connect to it with nRF Connect for Android/iOS/Desktop and write 01 to this characteristic. You should see that it will disconnect and start advertising as DFU targ (if a bootloader is flashed).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/255993?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2020 14:05:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31a25ff9-95ab-4bb1-8c79-503409a610c5</guid><dc:creator>JayLynkz</dc:creator><description>&lt;p&gt;Thanks for your answer Edvin.&lt;/p&gt;
&lt;p&gt;The link I was mentionning is the bootloader settings configuration found at&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/struct_sdk/struct/sdk.html"&gt;Software Development Kit&lt;/a&gt;&lt;span&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/struct_sdk/struct/sdk_nrf5_latest.html"&gt;nRF5 SDK v17.0.0&lt;/a&gt;&lt;span&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/modules.html"&gt;API Reference&lt;/a&gt;&lt;span&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/group__app__common.html"&gt;SDK common libraries&lt;/a&gt;&lt;span&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/group__nrf__bootloader.html"&gt;Bootloader modules&lt;/a&gt;&amp;nbsp;(the link is corrupted when I paste it).&amp;nbsp; I can see there is a macro called&amp;nbsp;&lt;span&gt;NRF_BL_DFU_ENTER_METHOD_BUTTONLESS for which it says I have to enable the buttonless DFU by setting the&amp;nbsp;enter_buttonless_dfu boolean to 1. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m guessing it&amp;#39;s what you mean by &amp;quot;&lt;em&gt;The easiest is probably to include the buttonless_dfu service pretty much as is&lt;/em&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My question is how do I set it to 1 ? I&amp;#39;m trying to follow the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fservice_dfu.html"&gt;buttonless secure dfu service&lt;/a&gt;&amp;nbsp;page. I would like to know in which part of the code do I need to make the changes. My bootloader, the application, another specific bootloader .. ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/255940?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2020 10:28:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb2ae4d9-b6b9-4d17-aacb-b13e1c03271e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Jerome,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]I would like to know how to switch the boolean mentionned in this&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_sdk%2Fstruct%2Fsdk.html"&gt;infocenter link&lt;/a&gt;&amp;nbsp;.[/quote]
&lt;p&gt;&amp;nbsp;Not sure what you tried to link to. Please note that infocenter doesn&amp;#39;t update the URL when you click links. Also, the link is corrupted once you open it for some reason. Right click on the link to what you want to link to and select &amp;quot;copy link&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you say, yes. There are several ways to enter DFU mode. The easiest is probably to include the buttonless_dfu service pretty much as is, and it will handle the registers that the bootloader will check when it boots up. That being said, I have never checked exactly what it does. It mostly just works.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another way is to use the GPREGRET . What to write to this register is probably based on the SDK version. I&amp;#39;ll use 16.0.0 as an example:&lt;/p&gt;
&lt;p&gt;See&amp;nbsp;dfu_enter_check() in the bootloader project (found in nrf_bootloader.c)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    if (NRF_BL_DFU_ENTER_METHOD_GPREGRET &amp;amp;&amp;amp;
       (nrf_power_gpregret_get() &amp;amp; BOOTLOADER_DFU_START))
    {
        NRF_LOG_DEBUG(&amp;quot;DFU mode requested via GPREGRET.&amp;quot;);
        return true;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;BOOTLOADER_DFU_START is defined in nrf_bootloader_info.h:&lt;/p&gt;
&lt;p&gt;#define BOOTLOADER_DFU_START&amp;nbsp; &amp;nbsp; (BOOTLOADER_DFU_GPREGRET | BOOTLOADER_DFU_START_BIT_MASK)&lt;/p&gt;
&lt;p&gt;Which gives:&lt;/p&gt;
&lt;p&gt;0xB1.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So if you write 0xB1 to GPREGRET it will enter DFU mode when the device resets.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please note that writing to registers may take some time, so you can&amp;#39;t write and reset immediately after. Use something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_power_gpregret_set(0xB1);
while ((nrf_power_gpregret_get() &amp;amp; 0xB1) != 0xB1)
{
    // Wait.
}
NVIC_SystemReset();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>