<?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>switching to dfu without reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44288/switching-to-dfu-without-reset</link><description>Hi, 
 My system needs to maintain certain gpio at their state at all times, including when switching to bootloader, 
 I understand that reset will also return my gpios to input mode, 
 Is there a solution ? 
 Maybe a way to switch to dfu/bootloader without</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Mar 2019 18:51:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44288/switching-to-dfu-without-reset" /><item><title>RE: switching to dfu without reset</title><link>https://devzone.nordicsemi.com/thread/174378?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 18:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67bc8d3f-8f31-452a-9b68-96862e6d59e7</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Definitely an option, but we already have the hardware,,,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Why is it such a &amp;quot;&lt;span&gt;perilous&amp;quot; thing to do ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would appreciate your insights&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Eran&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: switching to dfu without reset</title><link>https://devzone.nordicsemi.com/thread/174253?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 12:56:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d444b94e-e543-43f6-8a18-4f68149b2703</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;I don&amp;#39;t know your schematics, but why external pull-up is not an option? When MCU is powered up, your pin will be tied to power line (I mean output of the regulator, not battery) through a pull-up all the time, and you can switch off by setting GPIO to 0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: switching to dfu without reset</title><link>https://devzone.nordicsemi.com/thread/174196?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 09:38:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cd77e4b-627b-49bc-812a-8a824593d645</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hi Dimitry,&lt;/p&gt;
&lt;p&gt;Thanks for those inputs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The reason for this Configuration and requirement :&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the uC is powered by a voltage regulator.&lt;/p&gt;
&lt;p&gt;The voltage regulator is POWERED by a battery or external charger/external power.&lt;/p&gt;
&lt;p&gt;the voltage regulator is ENABLED by the uC or the external charger.&lt;/p&gt;
&lt;p&gt;The battery is not enabling the voltage regulator&lt;/p&gt;
&lt;p&gt;once the system connected to charger, the charger enables the regulator&amp;nbsp;- thus the uC awakes and than holds a GPIO that maintains the voltage regulator by itself, in this point we can disconnect the external charger and the voltage regulator will still be enabled by the GPIO.&amp;nbsp;, self maintained by the GPIO.&lt;/p&gt;
&lt;p&gt;However - if we reset, the GPIO drops and than the regulator will be disable, the uC will have no power to awake from reset and we could not continue with the bootloader.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Eran&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: switching to dfu without reset</title><link>https://devzone.nordicsemi.com/thread/174190?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 09:27:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f56930a-d3de-46d3-8eee-26e408467298</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Okay, you can try to do such a perilous thing - disable SoftDevice, disable interrupts, ensure that no peripherals are running and you&amp;#39;re not using flash protection module, call sd_softdevice_vector_table_base_set(BOOTLOADER_ADDRESS), then set GPREGRET register and pass control directly to bootloader in some way like this:&lt;/p&gt;
&lt;p&gt;typedef void (*jmp_to_boot)(void);&lt;/p&gt;
&lt;p&gt;((jmp_to_boot)(BOOTLOADER_ADDRESS+1))();&lt;/p&gt;
&lt;p&gt;Maybe this will work. But your idea with pin is somewhat strange - are you sure that no reset will occur because of other reasons (power glitches, exceptions in the code, etc)? It&amp;#39;s a good practice to use a watchdog that will reset MCU in case if something went wrong. I still can&amp;#39;t get the purpose of this pin - to hold power enable? for tamper protection? maybe there&amp;#39;s another option to solve this at hardware level?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: switching to dfu without reset</title><link>https://devzone.nordicsemi.com/thread/174148?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 07:37:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:064137a0-ba9d-4a7e-a1b0-bfed3c92c09e</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would really appreciate some help with a good solution to switch between application and dfu without going through reset&lt;/p&gt;
&lt;p&gt;Thanks !&lt;/p&gt;
&lt;p&gt;Eran&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: switching to dfu without reset</title><link>https://devzone.nordicsemi.com/thread/173818?ContentTypeID=1</link><pubDate>Sat, 02 Mar 2019 13:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9df0fd3-a5a8-4ad2-9cda-e019845e48e1</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hi Ketiljo,&lt;/p&gt;
&lt;p&gt;I will be more clear - the idea is that&amp;nbsp;ONCE the uC is up it holds the gpio, there is one initial external trigger to the gpio and from that point the uC is in charge of maintaining it. even if we&amp;nbsp;switch to dfu it should still be held, so&amp;nbsp;there is no option for the hardware to include a pull-up, I need to have it maintained at &amp;#39;1&amp;#39; high level while switching from Application to DFU.&lt;/p&gt;
&lt;p&gt;Is there an option to switch between Application to DFU without reset, in the same way we switch from DFU to Application - nrf_bootloader_app_start(MAIN_APPLICATION_START_ADDR), only the other way around ? what will be the implications of doing something like that ? and would you recommend it ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Eran&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: switching to dfu without reset</title><link>https://devzone.nordicsemi.com/thread/173740?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 14:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b7a7c4f-f9f3-4600-8db6-c6cfd0b00d44</guid><dc:creator>ketiljo</dc:creator><description>&lt;p&gt;Reset will set GPIOs to inputs. Use pull up and pull down resistors if you need to maintain the logic levels at all times.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>