<?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>Can I use a gpio pin to change boot mode?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70496/can-i-use-a-gpio-pin-to-change-boot-mode</link><description>Hello, I&amp;#39;m beginner for nRF52. 
 I saw examples about entering DFU by button and buttonless. 
 Is it also possible that changing the boot mode by a gpio pin which controlled by external source? 
 Just for example, if the gpio pin is high then boot as</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Jan 2021 09:02:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70496/can-i-use-a-gpio-pin-to-change-boot-mode" /><item><title>RE: Can I use a gpio pin to change boot mode?</title><link>https://devzone.nordicsemi.com/thread/289939?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2021 09:02:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:554e62ec-609d-4621-8f01-4655d62325a5</guid><dc:creator>lupin</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thank you for your &lt;span&gt;explanation. It&amp;#39;s very helpful.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Calvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I use a gpio pin to change boot mode?</title><link>https://devzone.nordicsemi.com/thread/289392?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 11:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce4f249-f220-4d96-b624-4a686936a6d3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Calvin,&lt;/p&gt;
&lt;p&gt;That is very much possible. In fact, there is a built in GPIO detect functionality in the bootloader. Check out the example:&lt;/p&gt;
&lt;p&gt;SDK\examples\dfu\secure_bootloader\pca10040e_...&lt;/p&gt;
&lt;p&gt;and check out&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON and&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN in sdk_config.h, and how it is used in&amp;nbsp;dfu_enter_check() in nrf_bootloader.c.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So let us say that the external device sets this pin high or low (it is set to active low by default, but you can change that if you like). If the device reboots at this point in time, then it would go to DFU mode, as long as NRF_BL_DFU_ENTER_METHOD_BUTTON is set to true, and the pin NRF_BL_DFU_ENTERN_METHOD_BUTTON_PIN is held low. What you may want to do is to add the part in your application where an interrupt handler on the same pin will reset the device, so that the bootloader will run, detect that the pin is still held low, and enter DFU mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>