<?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>Keeping GPIO high state during OTA DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103419/keeping-gpio-high-state-during-ota-dfu</link><description>I found a few old support tickets mentioning the same topic, but most referred to very old versions of the SDK. 
 We designed a nRF52840 board with an electronic switch controlled by a GPIO pin. When the device is shipped, the switch is off and the battery</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Sep 2023 16:41:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103419/keeping-gpio-high-state-during-ota-dfu" /><item><title>RE: Keeping GPIO high state during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/445910?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2023 16:41:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cb5c6ac-46fa-4652-b7d9-0820beec5bd2</guid><dc:creator>robca</dc:creator><description>&lt;p&gt;Thanks for confirming this, Jonathan. Not the answer I was hoping for, but a definitive one nonetheless.&lt;/p&gt;
&lt;p&gt;Please close this ticket at your conveninence.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keeping GPIO high state during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/445789?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2023 09:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b882a00-35d7-4e85-bbd4-b3d4e6b16598</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Sorry for the slow reply here, but the answer is no. There is no SW fix here,&amp;nbsp; but in theory the device could &amp;quot;survive&amp;quot; a short time with the pins not driven high if there is enough capacitance, so you could test if the product can survive&amp;nbsp;a short time where the pins are reset. So maybe some customers are lucky and don&amp;#39;t need to put it in the charger.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The device will reset during DFU so the pins will not keep their state during reset so this issue will happen. Best bet is to just keep it in the charger.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keeping GPIO high state during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/445254?ContentTypeID=1</link><pubDate>Sun, 10 Sep 2023 16:59:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23c1f54d-1cff-4734-9d7f-c5ddd6ee7035</guid><dc:creator>robca</dc:creator><description>&lt;p&gt;Any suggestion on software workarounds? Is there still a way to use the legacy trick? If so, how should I approach it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keeping GPIO high state during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/444375?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2023 16:29:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4cef74a-551d-4bd8-bbcc-8731257848ff</guid><dc:creator>robca</dc:creator><description>&lt;p&gt;Well, yes, that works but it&amp;#39;s a poor workaround&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;: users rarely read the documentation and even if the update code were to warn the user to do it while connected, they might still not do it and have a bad experience/call support.&lt;/p&gt;
&lt;p&gt;In an old thread (&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/19655/gpio-high-during-dfu"&gt;GPIO high during DFU&lt;/a&gt;&amp;nbsp;), someone suggested&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;the gpio register is cleared on system reset, but you could try the approach we used in 
our legacy bootlaoder which was to branch to the reset handler of the bootloader instead 
of doing a system reset, see bootloader_util_reset() implementation in bootloader_util.c 
(included in SDK 11).&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But the code in SDK 17.1 is radically different, so I&amp;#39;m not sure if that is still doable. Before starting to hack away at the DFU code, I was hoping for a bit more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keeping GPIO high state during OTA DFU</title><link>https://devzone.nordicsemi.com/thread/444347?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2023 13:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d813048-8f20-4eb1-b0aa-6424f1ce1f71</guid><dc:creator>JONATHAN LL</dc:creator><description>[quote user=""]to do it while the device is powered by the charger (which is an acceptable workaround).[/quote]
&lt;p&gt;Looks like you found your solution!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So the device will do a soft reset while the OTA DFU&amp;#39;s, so the GPIO pin states will not be retained. The workaround you found is now the new fix.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>