<?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>Real Button to trigger DFU for an Buttonless application (nRF52832 / SD V15.0.0)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38235/real-button-to-trigger-dfu-for-an-buttonless-application-nrf52832-sd-v15-0-0</link><description>Hello, 
 
 We have a Buttonless custom board based on a nRF5282 with SDK 15.0.0 
 The DFU OTA Buttonless works fine, but to prevent the device to brick we put a physical button to trigger the bootloader in case of crash. 
 This button is aimed to be pressed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Sep 2018 09:29:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38235/real-button-to-trigger-dfu-for-an-buttonless-application-nrf52832-sd-v15-0-0" /><item><title>RE: Real Button to trigger DFU for an Buttonless application (nRF52832 / SD V15.0.0)</title><link>https://devzone.nordicsemi.com/thread/147529?ContentTypeID=1</link><pubDate>Thu, 06 Sep 2018 09:29:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f084559-6e9d-4d6f-bd4b-2c34c38871d9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello John,&lt;/p&gt;
&lt;p&gt;There are probably several ways of achieving&amp;nbsp;this, but I would suggest to try something like this:&lt;/p&gt;
&lt;p&gt;1. Start a one off app timer instance once the app detects a button press, and when receiving the timer timeout callback, check if the pin is still pressed. Then perform a soft reset if the pin was pressed for x seconds. Alternatively, poll the input state every second to ensure the button was pressed the entire time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp; In sdk_config.h header for bootloader, make sure&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON is enabled and&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN is assigned to the same pin as the one used by the app. Note: bootloader button initialization need to be changed if your button is not active low.&lt;/p&gt;
&lt;p&gt;This way you don&amp;#39;t&amp;nbsp;have&amp;nbsp;to use GPREGRET to signal the bootloader to enter DFU mode.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>