<?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>DFU one button design</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34979/dfu-one-button-design</link><description>This post had a discussion on using one button but the first reply suggested a buttonless solution. So now I&amp;#39;m not sure if one button dfu is best if same button is used for reset and wake. Which sequence is recommended, 1) remove the coin battery, press</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Jun 2018 05:27:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34979/dfu-one-button-design" /><item><title>RE: DFU one button design</title><link>https://devzone.nordicsemi.com/thread/134823?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 05:27:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fde4bbb5-b311-4820-a6e9-9ce0309b669b</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I had&amp;nbsp;removed&amp;nbsp;&lt;span&gt;CONFIG_GPIO_AS_PINRESET in dfu but not in the app which&amp;nbsp;was the missing step.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-thank-you.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU one button design</title><link>https://devzone.nordicsemi.com/thread/134669?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 08:00:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e53e517-652a-4c37-a3da-bae145507537</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Simon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look at address 101200 you can see 0x00000015 was written on both&amp;nbsp;PSELRESET[0] and&amp;nbsp;PSELRESET[1] (0x15 = 21= P0.21)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is because there is a configuration in the preprocessor symbol in project setting :&amp;nbsp;CONFIG_GPIO_AS_PINRESET&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you remove&amp;nbsp;that, recompile and do a full erase of the chip to erase the UICR , you should be able to use P021 as normal GPIO pin. Note that then you don&amp;#39;t have a pin reset.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU one button design</title><link>https://devzone.nordicsemi.com/thread/134627?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 01:20:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cc30f96-f52e-4e29-9fdc-7010bbdfa47a</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;m using this example&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-cb04964b67ad4922abd8ddafe3019242/nRF5_5F00_SDK_5F00_15_5F00_52810_5F00_bootloader_5F00_iar_5F00_keil_5F00_ses_5F00_gcc.zip"&gt;nRF5_SDK_15_52810_bootloader_iar_keil_ses_gcc.zip&lt;/a&gt;&amp;nbsp;for the custom one button.&lt;/p&gt;
&lt;p&gt;I ran nrfjprog --family nrf52 --readuicr uicr-1.txt and comparing to nrf52810 product spec 4.5.1.60 PSELRESET[0] to check if registers are configured but not sure which line to check.&lt;/p&gt;
&lt;p&gt;I was able to confirm using the zip example that&amp;nbsp;&lt;span&gt;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN = 21 works for 10040-DK, and from before&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_PINRESET = 1 using custom button p0.21.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So&amp;nbsp;it seems the zip application configured the&amp;nbsp;pin as a reset but not as a button for the custom board.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I removed DEVELOP_IN_NRF52832 in Keil, Options for Target, Define and changed pin in pca10040.h. Also noticed that the LED is not&amp;nbsp;working according to the pin setting, then something is wrong in how the board file is being read for the custom. Is there another Keil setting for the custom board? (I mostly use SES).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Update: Since&amp;nbsp;I started writing this response&amp;nbsp;there has been an update&amp;nbsp;to an&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/32918/nrf52810-secure-ble-dfu-on-iar---not-connecting" rel="noopener noreferrer" target="_blank"&gt;SES version for s112&lt;/a&gt;&amp;nbsp;being available (same as zip link above). I tested this and getting the same error as in my &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34939/dfu-s112---cpu-could-not-be-halted" rel="noopener noreferrer" target="_blank"&gt;previous case&lt;/a&gt; with error &amp;quot;CPU could not be halted&amp;quot;. So now not sure if the Keil error carried over to the SES version and is board file related. (I have other SES apps in standard sdk 15.0 that work ok for the custom). (I tried zip as is for custom and same error).&lt;/p&gt;
&lt;p&gt;-thank-you.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/uicr_2D00_1.txt"&gt;devzone.nordicsemi.com/.../uicr_2D00_1.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU one button design</title><link>https://devzone.nordicsemi.com/thread/134507?ContentTypeID=1</link><pubDate>Mon, 04 Jun 2018 10:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5ac286d-f6fa-43df-996a-585e6f1336d6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Simon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;P0.21 is a special GPIO pin that it can also be as reset pin. Could you check if you application configured the pin as reset pin or not ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please check if PSELRESET[] registers are configured in UICR.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can also debug the bootloader and check inside&amp;nbsp;dfu_enter_check() in nrf_bootloader.c if the pin is read correctly.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU one button design</title><link>https://devzone.nordicsemi.com/thread/134414?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2018 22:18:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db03187d-7359-44e3-ae79-9f8c57ad21b1</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The three options&amp;nbsp;then are valid and&amp;nbsp;good to test with P0.21, ok.&lt;/p&gt;
&lt;p&gt;In sdk_config.h, I set&amp;nbsp;&lt;span&gt;NRF_BL_DFU_ENTER_METHOD_PINRESET = 1, and the device flipped from the app to dfu when in app mode and button pressed, then returned to app mode after timeout, ok.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then I tried&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN = 21 (tactile button on the nRF52810&amp;nbsp;between P0.21 &amp;amp; GND), removed power, pressed button, returned power, released button and still in app mode. Which part is missing or not right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-thank-you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU one button design</title><link>https://devzone.nordicsemi.com/thread/134338?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2018 11:09:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5883093f-4282-4007-a2ab-b7bff93413c5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Simon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How you want to enter DFU is totally your choice.&lt;/p&gt;
&lt;p&gt;If your device doesnt have any physical button (because you need to encapsulate it&amp;nbsp;for example)&amp;nbsp; or if you don&amp;#39;t want your end user have to touch the device (you want the DFU update to be totally transparent to the end user) you can use buttonless solution.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, the physical button has its own advantage. You can always fallback to the bootloader&amp;nbsp;regardless what happens with the app. Think about you don&amp;#39;t have a button and rely on the app to send the device to DFU mode, and then for some reasons the app crashes before you can send the command to switch to DFU. Then your device could be bricked.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The best solution is to have both, hold a button when resetting to enter DFU and buttonless option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In SDK v15, the button is defined in&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN,&amp;nbsp;dfu_enter_check() will check if the button is pressed or not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>