<?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>Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118608/reducing-startup-time-with-mcuboot-in-nrf-desktop</link><description>I am building a firmware based on nRF Desktop, but can reproduce the issue in nRF Desktop SDK 2.9.0. The issue is that MCUBoot takes almost 1s to start the app, even with RC oscillator LF clock source and with slot0 validation disabled. 
 To reproduce</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Feb 2025 17:49:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118608/reducing-startup-time-with-mcuboot-in-nrf-desktop" /><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522938?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 17:49:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c67aff29-d6fd-4d15-8815-e1e54ddff11d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;No.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522911?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 15:14:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9907c81e-9683-4c9f-80f9-3c16c2d79f60</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Ok, in that case I will need to drop xip. Does it need any changes to partition manager?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522884?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 14:06:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc7a4834-62c0-4ac9-ac9d-00b61b38f136</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;No, it&amp;#39;s not a bug.&amp;nbsp;&lt;span&gt;swap modes always boot from slot 0, direct XIP boots from the highest version, and no state is stored, so you need to determine which image is valid and has the highest version, and the only way to do that is to validate at startup. Therefore, Currently,&amp;nbsp;CONFIG_BOOT_VALIDATE_SLOT0 and Direct-XIP is not a combination we support.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522722?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 17:35:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2d684ca-f6e5-40da-8fc5-4bed01822d3f</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Ok, is that a bug? I&amp;rsquo;d like to keep direct xip&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522708?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 16:56:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddba7399-f924-45bc-a48d-614cdaf49459</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;You can disable the&amp;nbsp;&lt;span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.9.0/applications/nrf_desktop/configuration/nrf52840dk_nrf52840/sysbuild_fast_pair.conf#L10"&gt;direct xip in mcuboot mode (SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP)&lt;/a&gt;, then CONFIG_BOOT_VALIDATE_SLOT0=n takes effect.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522353?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 08:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85803d29-860e-4e4f-be64-4e7262916797</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Does that mean I can&amp;rsquo;t disable signature verification at boot?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522299?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2025 19:31:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32f07c35-07a1-444e-8103-c033d228e401</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;Because RSA is mbedtls which is slower, please try to use&amp;nbsp;ecdsa which is tinycrypt.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522063?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 23:16:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a80fba2b-3e39-42dc-8a4b-edbfca3f27cb</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Yes, that is where I set it, as described in my original post. And like you found, it is not set in .config. But the 920ms delay still persists.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522054?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 20:22:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3d3a9fc-bc05-48e3-a061-c0d3e2451b58</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="nrbrook"] it seems&amp;nbsp;&lt;span&gt;CONFIG_BOOT_VALIDATE_SLOT0 isn&amp;#39;t disabling it, how can it be disabled (while still validating during DFU)?&lt;/span&gt;[/quote]
&lt;p&gt;How do you add&amp;nbsp;&lt;span&gt;CONFIG_BOOT_VALIDATE_SLOT0?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I add&amp;nbsp;CONFIG_BOOT_VALIDATE_SLOT0=n in the nrf_desktop/configuration/nrf52840dk_nrf52840/images/mcuboot/prj_fast_pair.conf, and&amp;nbsp;CONFIG_BOOT_VALIDATE_SLOT0 is not set in the .config under&amp;nbsp;build/mcuboot/zephyr.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1738959059924v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/522036?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 17:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:705ce4a3-1a08-43d5-9ce4-1be860574eff</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;I only want signature verification at DFU. After that, I don&amp;#39;t need it every boot. But it seems&amp;nbsp;&lt;span&gt;CONFIG_BOOT_VALIDATE_SLOT0 isn&amp;#39;t disabling it, how can it be disabled (while still validating during DFU)?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/521960?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 13:57:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7968095e-caa3-46aa-899e-80b83070226f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;52832 has no hardware crypto. Having some sort of signature is a must for you?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;RSA is mbedtls which is slower than a tortoise, and&amp;nbsp;ecdsa is tinycrypt.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/521753?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 14:33:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72edd671-d7c0-4453-9ba1-85edda20ec06</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;I had to generate a key using&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;python ../../../../../../../bootloader/mcuboot/scripts/imgtool.py keygen -k mcuboot_private_ed.pem -t ecdsa-p256&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;from the mcuboot directory, because the key you specified didn&amp;#39;t exist.&lt;/p&gt;
&lt;p&gt;Then it started in 120ms &amp;nbsp;&amp;ndash; much better! But why is RSA so much slower given&amp;nbsp;CONFIG_BOOT_VALIDATE_SLOT0=n&lt;/p&gt;
&lt;p&gt;Furthermore, my real application is on nrf52832, which has smaller flash, and I recall ecdsa requires much more space in the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/521735?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 13:39:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a561b20-bb90-443a-80a6-639c4c754fa3</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Could you try the following and let me know?&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;--- a/applications/nrf_desktop/configuration/nrf52840dk_nrf52840/sysbuild_fast_pair.conf
+++ b/applications/nrf_desktop/configuration/nrf52840dk_nrf52840/sysbuild_fast_pair.conf
@@ -8,5 +8,6 @@
SB_CONFIG_BT_FAST_PAIR=y
SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
-SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
-SB_CONFIG_BOOT_SIGNATURE_KEY_FILE=&amp;quot;\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private_fast_pair.pem&amp;quot;
+SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
+SB_CONFIG_BOOT_SIGNATURE_KEY_FILE=&amp;quot;\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private_ed.pem&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;cp ../../nrf52840gmouse_nrf52840/images/mcuboot/mcuboot_private.pem mcuboot/mcuboot_private_ed.pem&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/521626?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2025 18:57:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f69d05ea-546e-43c7-b885-30af12f414f7</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;That is what I was testing with. With base configuration I get no delay. With fast pair I get 1s.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/521615?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2025 17:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f645d04a-9ee8-4bc1-9d62-2533acac780e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Could you test with nRF52840DK? We&lt;span&gt;&amp;nbsp;got virtually no delay between button presses and led the operation.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/521359?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:22:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48de6eb2-8e5f-45f5-971e-7510c0ab7dd6</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;No, it is just the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing startup time with MCUBoot in nRF Desktop</title><link>https://devzone.nordicsemi.com/thread/521349?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:06:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bed97d7-9547-44e0-ab50-4ca77d50fefb</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you also add&amp;nbsp;CONFIG_NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED=n to&amp;nbsp;&lt;span&gt;images/mcuboot/prj_fast_pair.conf? Does it help?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>