<?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>Disable/enable bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69694/disable-enable-bootloader</link><description>Hi, 
 I have a project with nrf52832 without any BLE operation. Software runs with FreeRTOS. I am trying to add ble dfu into this project. There is a button connected to the mcu so i can use this button to enter dfu mode. But except this situtation i</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Dec 2020 10:33:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69694/disable-enable-bootloader" /><item><title>RE: Disable/enable bootloader</title><link>https://devzone.nordicsemi.com/thread/286261?ContentTypeID=1</link><pubDate>Tue, 22 Dec 2020 10:33:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f66b71e-0592-4e61-b3d2-f7203dc07365</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="oguzhanK"]In examples i only saw buttonless_dfu example so i thought i need to use that one. [/quote]
&lt;p&gt;I see. If you do not need the application do do anything to put the device in DFU mode, then this example app does not give you anything useful. You can use any example application and it will work even though it has no idea that there is a bootloader.&lt;/p&gt;
[quote user="oguzhanK"]After uploading bootloader i could not be able to enter in debug mode so i found this method &amp;quot;Writing&lt;span&gt;&amp;nbsp;0x01 into&amp;nbsp;BOOTLOADER_SETTINGS_ADDRESS =&amp;nbsp;(0x0007F000UL) .&amp;nbsp;&lt;/span&gt;&amp;quot;in&amp;nbsp;Common FAQs on DFU[/quote]
&lt;p&gt;This approach only works on very old SDK versions. Recent SDK versions check the hash of the firmware when booting, so it is not enough to flag that a valid firmware is present. You also need to generate and write the DFU settings page. See &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_settings_generate_display.html"&gt;nrfutil documentation&lt;/a&gt; for how to do this.&lt;/p&gt;
[quote user="oguzhanK"]When this button is pressed device will enter into dfu mode and after complating update or device reset will make device out of the dfu mode.&amp;nbsp;[/quote]
&lt;p&gt;Should this be just a button press? And is this the pin reset button, or would it be a normal button? If pin reset, then you can make the device always enter DFU mode by pin reset by configuring the bootloader accordingly (setting&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_PINRESET to 1 in the bootloader&amp;#39;s sdk_config.h). If you use a GPIO and this needs to be handled when the app is running (not just read after reset), then you need to handle this in the application. In that case you could write BOOTLOADER_DFU_GPREGRET to GPREGRET and reset. For that to work, you would need to set&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_GPREGRET to 1 in the bootloader&amp;#39;s sdk_config.h.&lt;/p&gt;
&lt;p&gt;Please note that I will be off until beginning of January so I may not be able to reply until then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable/enable bootloader</title><link>https://devzone.nordicsemi.com/thread/286218?ContentTypeID=1</link><pubDate>Tue, 22 Dec 2020 07:17:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36c30019-644b-4e49-a62a-d716bc80cbee</guid><dc:creator>oguzhanK</dc:creator><description>&lt;p&gt;In examples i only saw buttonless_dfu example so i thought i need to use that one. After uploading bootloader i could not be able to enter in debug mode so i found this method &amp;quot;Writing&lt;span&gt;&amp;nbsp;0x01 into&amp;nbsp;BOOTLOADER_SETTINGS_ADDRESS =&amp;nbsp;(0x0007F000UL) .&amp;nbsp;&lt;/span&gt;&amp;quot;in&amp;nbsp;Common FAQs on DFU .&lt;/p&gt;
&lt;p&gt;When this button is pressed device will enter into dfu mode and after complating update or device reset will make device out of the dfu mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable/enable bootloader</title><link>https://devzone.nordicsemi.com/thread/286063?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 13:45:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10a29539-e96f-4bfb-adf8-734decddf595</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is not entirely clear to me. Can you elaborate both on what you want to achieve and what you have done?&lt;/p&gt;
[quote user=""]I tried to write 0x01 into&amp;nbsp;BOOTLOADER_SETTINGS_ADDRESS =&amp;nbsp;(0x0007F000UL) for nrf52 but this did not work.&amp;nbsp;[/quote]
&lt;p&gt;I do not see what good that should do?&lt;/p&gt;
&lt;p&gt;You write that you would like to use a button to decide if you should use bootloader and SoftDevice or not. Does that mean that if the button is pressed, then device should enter DFU mode? And if not, it should start the application? Should this button only be checked during reset (for instance when battery is removed and reinserted), or in other cases? If so, there is no need to use the buttonless_dfu example, and you could limit DFU related code to the bootloader and the app would not need to know that the bootloader even exists.&lt;/p&gt;
&lt;p&gt;Perhaps it would be best if you explain the end goal in detail, and then I can suggest how you can achieve it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>