<?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>beacon and firmware update example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51357/beacon-and-firmware-update-example</link><description>Hi, I am new to Nordic BLE development and trying to create an application that has beacon functionality with firmware upgrade over the BLE with the mobile phone and Nordic DFU app. I have tried ble_app_beacon and it works quite nice, but I would like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Aug 2019 09:26:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51357/beacon-and-firmware-update-example" /><item><title>RE: beacon and firmware update example</title><link>https://devzone.nordicsemi.com/thread/206298?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 09:26:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:846efd62-823b-41c7-8fd8-2c93b5da5d8e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, if you use &amp;#39;&lt;span&gt;NRF_BL_DFU_ENTER_METHOD_BUTTON&amp;#39;&lt;/span&gt; you can just power-cycle the board while&amp;nbsp;you keep the button pressed. It should not be a problem to support DFU since you are making a Beacon app. The size limit for your app will be defined by the App start address minus the start address of the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon and firmware update example</title><link>https://devzone.nordicsemi.com/thread/206290?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 09:07:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a6ab538-8101-4229-9015-3ff015040249</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;Thank you. This is realy good. And as I understand, if I can power cycle a device then I do not need to do much with beacon example, because the MCU will go to DFU state after the power cycle.&amp;nbsp;&lt;br /&gt;Also, do you think NrF52810 has enough memory for DFU functionality?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon and firmware update example</title><link>https://devzone.nordicsemi.com/thread/206284?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 08:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28f6e6ef-fb90-4374-be45-1d94bcf121ef</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Voja,&lt;/p&gt;
&lt;p&gt;Ok, you don&amp;#39;t need to add a lot of code to the main app to make the button put the device in DFU mode.&amp;nbsp;&lt;a title="GPREGRET" href="https://infocenter.nordicsemi.com/topic/ps_nrf52810/power.html?cp=3_3_0_4_2_8_10#register.GPREGRET"&gt;GPREGRET&lt;/a&gt;&amp;nbsp;is a&amp;nbsp;general-purpose retention register which you can use to signal the bootloader to enter DFU mode on subsequent boot. Just remember to use&amp;nbsp;the Softdevice API&amp;nbsp;&lt;a title="sd_power_gpregret_set" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v6.1.1/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=3_4_0_1_2_6_2_16#ga62737e6515d380aa3eeba6582d061592"&gt;sd_power_gpregret_set&lt;/a&gt;() if you&amp;#39;re accessing the register while the Softdevice enabled because the SD sandboxes the POWER peripheral.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//Code in main app to reset into Bootloader DFU

/*

BOOTLOADER_DFU_START == 0xB1. Bootloader enters dfu mode if retention register has this value on boot.

*/

sd_power_gpregret(0, BOOTLOADER_DFU_START);

/*Perform a soft reset to start the bootloader */

NVIC_SystemReset();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;Edit: On second thought: it&amp;#39;s even easier to assign the pin to the &amp;quot;NRF_BL_DFU_ENTER_METHOD_BUTTON&amp;quot; in the bootloader. So the same pin is used to trigger a Soft reset in the app is read by the bootloader on startup. It can be a good idea to make&amp;nbsp;app logic so that the pin requires a long press, etc&amp;nbsp;to prevent&amp;nbsp;unintended resets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon and firmware update example</title><link>https://devzone.nordicsemi.com/thread/206119?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2019 12:48:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b410fb19-0f4f-4cf9-a8e4-8cf0b5fcf8ca</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;Thank you for your answer. I can not have one more button for the reset pin, so I suppose I need to integrate DFU related stuff. Do you think that nRF52810 could fit all this in the memory? As I said I need a beacon and DFU functionality. It is ok with me if only application firmware is upgradeable.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Voja.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon and firmware update example</title><link>https://devzone.nordicsemi.com/thread/206113?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2019 12:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:417ebdae-f1ba-4676-8b76-e86c687db555</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Voja,&lt;/p&gt;
&lt;p&gt;The beacon example&amp;nbsp;should be a good starting point for making a non-connectable beacon. For DFU, I&amp;#39;d recommend starting with this blog post:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader&lt;/a&gt;&amp;nbsp;to get an overview of our solution.&lt;/p&gt;
&lt;p&gt;Note that you don&amp;#39;t need to integrate anything DFU related in the app if the button is used for pin reset. In that case, you can compile the bootloader with the&amp;nbsp;&lt;span&gt;NRF_BL_DFU_ENTER_METHOD_PINRESET option set to &amp;#39;1&amp;#39; in sdk_config and the bootloader will enter DFU mode every time the device is reset through a pin reset. The bootloader will then stay in DFU mode for 2 minutes (default) before booting the beacon app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>