<?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 setting in Bootloader for nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64999/buttonless-dfu-setting-in-bootloader-for-nrf52832</link><description>Hello, 
 We have a custom board of nRF52832 with two buttons and right now Buttonless DFU is also working perfectly. But, we have scenario where if combination of two buttons pressed at once, than board gets into DFU mode and need to rid of it. Hence</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Aug 2020 13:43:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64999/buttonless-dfu-setting-in-bootloader-for-nrf52832" /><item><title>RE: Buttonless DFU setting in Bootloader for nRF52832</title><link>https://devzone.nordicsemi.com/thread/265792?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 13:43:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ae0e6ec-bb92-4a01-ae01-7ef016fd621a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a bit hard to get what exact issue you are having.&amp;nbsp;&lt;br /&gt;Could you record the phone&amp;#39;s screen when you do DFU ?&amp;nbsp;&lt;br /&gt;When the device stuck, do you know if it stuck in the bootloader or it stuck in the application ? The bootloader is not a black box, you can add breakpoint and step in if you want.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the bootloader to enter DFU mode you need to add the check for&amp;nbsp;&lt;span&gt;GPREGRET&amp;nbsp;&amp;nbsp;back in&amp;nbsp;nrf_dfu_enter_check().&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please also verify that you can do DFU if you only flash the softdevice + bootloader.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless DFU setting in Bootloader for nRF52832</title><link>https://devzone.nordicsemi.com/thread/265783?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 13:04:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17d17d55-0175-4f1e-9d0d-3fa7306519f1</guid><dc:creator>Nagarjun</dc:creator><description>&lt;p&gt;And also at debug output i get this,&lt;br /&gt;&lt;br /&gt;&amp;lt;info&amp;gt; app: ADC event number: 15&lt;br /&gt;&amp;lt;info&amp;gt; app: 713&lt;br /&gt;&amp;lt;info&amp;gt; app: Received indication state 1&lt;br /&gt;&amp;lt;info&amp;gt; app: hvx_len1 returned the err_code 3.&lt;br /&gt;&amp;lt;info&amp;gt; app: len1 returned the err_code 3.&lt;br /&gt;&amp;lt;info&amp;gt; app: sd_ble_gatts_hvx() returned the err_code 0.&lt;br /&gt;��������������������������������������&amp;lt;info&amp;gt; app: Setting vector table to bootloader: 0x00078000&lt;br /&gt;&amp;lt;info&amp;gt; app: Setting vector table to main app: 0x00023000&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless DFU setting in Bootloader for nRF52832</title><link>https://devzone.nordicsemi.com/thread/265715?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 09:27:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c57075-4e79-407a-8016-ce7ea3777f0e</guid><dc:creator>Nagarjun</dc:creator><description>[quote userid="2121" url="~/f/nordic-q-a/64999/buttonless-dfu-setting-in-bootloader-for-nrf52832/265612"]If you write to the dfu setting (and save it)&amp;nbsp;&lt;span&gt;&amp;nbsp;s_dfu_settings.enter_buttonless_dfu = 1; then you trigger a reset to bootloader then it should work.&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;I did not get you?&lt;br /&gt;&lt;br /&gt;I am just planning to do DFU update. I have no problem entering DFU mode.&amp;nbsp;the problem is after I enter, device turns off.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/64999/buttonless-dfu-setting-in-bootloader-for-nrf52832/265602"]GPREGRET is set (buttonless feature).[/quote]
&lt;p&gt;As you mentioned in previous reply. , even though in my application this is set&amp;nbsp;&lt;span class="pl-c1"&gt;sd_power_gpregret_set&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span class="pl-c1"&gt;0&lt;/span&gt;&lt;span&gt;, BOOTLOADER_DFU_START); and&amp;nbsp; i&lt;/span&gt;n the bootloader also I added GPREGRET&amp;nbsp; method for buttonless feature still device turns off after entering DFU mode during update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless DFU setting in Bootloader for nRF52832</title><link>https://devzone.nordicsemi.com/thread/265612?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2020 15:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:863e544f-3905-43b6-9e16-e33b762f797f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;How do you trigger DFU enter in your application (buttonless application) ?&lt;br /&gt;If you write to the dfu setting (and save it)&amp;nbsp;&lt;span&gt;&amp;nbsp;s_dfu_settings.enter_buttonless_dfu = 1; then you trigger a reset to bootloader then it should work.&amp;nbsp;&lt;br /&gt;But if you do&amp;nbsp;&amp;nbsp;s_dfu_settings.enter_buttonless_dfu = 1;&amp;nbsp; in&amp;nbsp;nrf_dfu_init()&amp;nbsp;then I don&amp;#39;t know what you are planning to do. This will just force the bootloader enter DFU mode all the time.&amp;nbsp;&lt;br /&gt;I strongly suggest you to study the code and have a rough idea of how it works before editing it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless DFU setting in Bootloader for nRF52832</title><link>https://devzone.nordicsemi.com/thread/265603?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2020 15:01:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2deb8a1-7dfd-478a-979d-c2e627a838e6</guid><dc:creator>Nagarjun</dc:creator><description>&lt;p&gt;HI Hung,&lt;br /&gt;&lt;br /&gt;Here is the overridden function below:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;bool nrf_dfu_enter_check(void)
{	
	if (s_dfu_settings.enter_buttonless_dfu == 1)
    {
        s_dfu_settings.enter_buttonless_dfu = 0;
        APP_ERROR_CHECK(nrf_dfu_settings_write(NULL));
        return true;
    }
	return false;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;How to to set&amp;nbsp;&lt;span&gt;GPREGRET&amp;nbsp;? I have set&amp;nbsp;&amp;nbsp;s_dfu_settings.enter_buttonless_dfu = 1; in nrf_dfu_init() function of nrf_dfu.c.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buttonless DFU setting in Bootloader for nRF52832</title><link>https://devzone.nordicsemi.com/thread/265602?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2020 14:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:400b883f-9cab-40a5-b39e-2e2cbe48ef8f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Nagarjun,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please post the modification you made. How&amp;nbsp; you override the function. What&amp;#39;s inside your override function.&amp;nbsp;&lt;br /&gt;Note that the&amp;nbsp;nrf_dfu_enter_check() has 2 checks first is to check if the button is pressed and second is to check if GPREGRET is set (buttonless feature).&amp;nbsp;&lt;br /&gt;In your case if you only want to get rid of button check you should remove :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    if (nrf_dfu_button_enter_check() == true)
    {
        return true;
    }
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>