<?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>Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109649/jump-to-bootloader-mcuboot-from-application-without-button</link><description>Hi, I&amp;#39;m currently getting familiar with mcuboot and DFU 
 First of all, thank you very much for the new Academy course that covers DFU! 
 If I understand correctly, to enter the bootloader (for Serial Recovery), the bootloader button has to be activated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Jul 2024 19:51:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109649/jump-to-bootloader-mcuboot-from-application-without-button" /><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/491685?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 19:51:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faa7504e-6035-40a8-9641-68ba668b0d80</guid><dc:creator>mlac</dc:creator><description>&lt;p&gt;Thanks for the reference! This has been trivial to implement based on&amp;nbsp;&lt;a id="" href="https://docs.zephyrproject.org/latest/services/retention/index.html"&gt;https://docs.zephyrproject.org/latest/services/retention/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I used the featured devicetree fragments and Kconfig options.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/489191?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 07:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d192d6c-0e79-43fb-a674-f8a12675342d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can include the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfx/drivers/power/hal.html#c.nrf_power_gpregret_set"&gt;NRF POWER HAL&lt;/a&gt; with &amp;#39;#include &amp;lt;hal/nrf_power.h&amp;gt;&amp;#39; and use the gpregret _set()/_get functions.&lt;/p&gt;
&lt;p&gt;I also&amp;nbsp;noticed that we now have introduced this new method to enter serial recovery mode:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/6869a65c9171849f1c50407b924e875fcc9d6e92/boot/zephyr/Kconfig.serial_recovery#L167"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/6869a65c9171849f1c50407b924e875fcc9d6e92/boot/zephyr/Kconfig.serial_recovery#L167&lt;/a&gt;. You may want to check if this symbol is available in the SDK version you are working with. In that case, it may be worth using the Retention System to avoid having to patch the mcuboot code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/489129?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2024 13:48:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0e68804-268f-4b38-ba9c-33fd94b21d92</guid><dc:creator>mlac</dc:creator><description>&lt;p&gt;Thanks, Vidar.&lt;/p&gt;
&lt;p&gt;How can I read/write&amp;nbsp;GPREGRET in Zephyr?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/489032?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2024 08:58:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3964773-e323-4889-8d9e-bdea8cf01d42</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you aren&amp;#39;t using the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/retention/index.html#retention-system"&gt;Retention System&lt;/a&gt;&amp;nbsp;for anything else, then I would just use the GPREGRET register directly. I don&amp;#39;t see any benefit of using the&amp;nbsp;retnetion system in that case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/488952?ContentTypeID=1</link><pubDate>Sat, 15 Jun 2024 16:19:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79a84c22-a99d-4742-9cbb-8aa0756493d7</guid><dc:creator>mlac</dc:creator><description>&lt;p&gt;Hi guys,&lt;/p&gt;
&lt;p&gt;I want to achieve the same as Michael.&lt;/p&gt;
&lt;p&gt;What are the pros and cons of using&amp;nbsp;GPREGRET vs the retention system, Vidar?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/475903?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 12:39:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bab79a39-93bf-45f9-8353-121a786dde03</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Michael,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is currently not implemented, but you can use the the GPREGRET register like in the nRF5 SDK or use&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/retention/index.html#retention-system"&gt;Retention System&lt;/a&gt;&amp;nbsp;and have the application store a flag to signal the bootloader to enter serial recovery mode on next reboot.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can trigger an NVIC_SystemReset() from the application by calling&amp;nbsp;sys_reboot(0).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is where serial recovery mode is entered when&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/86af2de75205ec5f2c846a2393934360de22fde4/boot/zephyr/Kconfig.serial_recovery#L152C12-L152C36"&gt;CONFIG_BOOT_SERIAL_WAIT_FOR_DFU&lt;/a&gt;&amp;nbsp;is enabled:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/86af2de75205ec5f2c846a2393934360de22fde4/boot/zephyr/main.c#L505"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/86af2de75205ec5f2c846a2393934360de22fde4/boot/zephyr/main.c#L505&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/475889?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 12:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0642745b-0273-4454-9cca-705d4edfc4a1</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;thanks for the fast reply. Waiting for DFU increases startup time, so we try to jump from the application into the bootloader under certain conditions. (This way, the bootloader entry could also be hidden or protected.) We used this concept in all our older products, as they are usually deployed in the field and it is not feasible to perform a power cycle for entering the bootloader.&lt;/p&gt;
&lt;p&gt;If I understand correctly, there is no such feature for enabling recovery mode from the application yet? Are there any plans to implement it in the future?&lt;/p&gt;
&lt;p&gt;As a dirty workaround, would it be possible to set a digital output pin in the application and then perform a reset (how can I perform a reset) and the bootloader reads the pin that I just set as a &amp;quot;pressed button&amp;quot;?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump to bootloader (mcuboot) from application without button</title><link>https://devzone.nordicsemi.com/thread/475885?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 12:05:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2da1fa11-e24f-4f0b-983d-f55a6e46a406</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Michael,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad to hear that you enjoyed the DFU course!&lt;/p&gt;
[quote user=""]If I understand correctly, to enter the bootloader (for Serial Recovery), the bootloader button has to be activated during startup.[/quote]
&lt;p&gt;Yes, you can use a button to signal the bootloader to enter Serial recovery on boot. Another option is to enable the&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/86af2de75205ec5f2c846a2393934360de22fde4/boot/zephyr/Kconfig.serial_recovery#L152C12-L152C36"&gt;CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y&lt;/a&gt;&amp;nbsp;symbol in your bootloader build. This will make the bootloader always enter serial recovery on startup.&amp;nbsp;&lt;/p&gt;
[quote user=""]Further, is the overlay that I created for my main project (board_name.overlay) also applied to the mcuboot child? Or will I have to create a separate overlay file for mcuboot (child_image\mcuboot.overlay)?[/quote]
&lt;p&gt;Yes, you will need to create a separate overlay for the mcuboot build. You can do this by creating a child_image folder, as you mentioned.&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/config_and_build/multi_image.html#permanent-configuration-changes-to-child-images"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/config_and_build/multi_image.html#permanent-configuration-changes-to-child-images&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>