<?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>Boot up time of NCS application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103379/boot-up-time-of-ncs-application</link><description>Hello, 
 I&amp;#39;m on development stage of product based on nrf52833. 
 For now, critical thing for me is boot up time. Device has to be ready about 150ms since VDD appear. 
 MCUBOOT is enabled(software update is also required). 
 My measurements looks as below</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Sep 2023 15:24:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103379/boot-up-time-of-ncs-application" /><item><title>RE: Boot up time of NCS application</title><link>https://devzone.nordicsemi.com/thread/444154?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 15:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62f4d6a5-a657-452b-9cca-29dc0cb1d06f</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;As far as I can tell, it&amp;#39;s&amp;nbsp;mainly a&amp;nbsp;&lt;span&gt;tradeoff between boot time and security. i.e. as mentioned&amp;nbsp;in the Kconfig&amp;nbsp;help text:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.9.99-ncs3/boot/zephyr/Kconfig#L178"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/v1.9.99-ncs3/boot/zephyr/Kconfig#L178&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Boot up time of NCS application</title><link>https://devzone.nordicsemi.com/thread/444046?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 09:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98abd12b-4dad-4e2c-89b7-fb1b1870fdc9</guid><dc:creator>trafficode</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/103379/boot-up-time-of-ncs-application/444042"]From start-up, until main() in the application is reached, you have all the PRE_KERNEL_1 , PRE_KERNEL_2 , and POST_KERNEL initialization. The device drivers you are using are initialized before your main() function. E.g. if you using the serial driver in your application, then the UART is initialized at PRE_KERNEL_1 level. The more drivers and things that are enabled, the longer time it will take.[/quote]
&lt;p&gt;I know it. Like I mentioned in first post: application without MCUBOOT boot up in 8ms, so thats the time of booting only the application, peripheralls etc. So there is no significant optimization to reach.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;DALI(Digital addresable lighting interface): two wire serial interface.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://www.dali-alliance.org/"&gt;https://www.dali-alliance.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BOOT_VALIDATE_SLOT0=n helped a lot. Now boot up time is about 10ms: APPL+MCUBOOT.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But&amp;nbsp;each stick has two ends. What I&amp;#39;m loosing in this approach?&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CONFIG_BOOT_VALIDATE_SLOT0&lt;/code&gt;&amp;nbsp;controls whether MCUboot validates the signature of the booted image on every boot (or just when upgrading). This can be disabled to make the boot process slightly faster, at the cost of no longer verifying a path of trust to the running image.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It seems to&amp;nbsp;be still secure,&amp;nbsp;do You know&amp;nbsp;some additional bad sides?&lt;/p&gt;
&lt;div id="gtx-trans" style="left:137px;position:absolute;top:379px;"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Boot up time of NCS application</title><link>https://devzone.nordicsemi.com/thread/444042?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 09:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aff9064-0668-4ec8-b636-978abdbcfcbf</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;From start-up, until main() in the application is reached, you have all the PRE_KERNEL_1 , PRE_KERNEL_2 , and POST_KERNEL initialization. The device drivers you are using are initialized before your main() function. E.g. if you using the serial driver in your application, then the UART is initialized at PRE_KERNEL_1 level. The more drivers and things that are enabled, the longer time it will take.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what this&amp;nbsp;DALI interface is, but in theory it could be up and running and be responsive before you reach main().&lt;/p&gt;
&lt;p&gt;Also, with MCUBoot, it will take longer before your application boots.&lt;br /&gt;MCUBoot will e.g. validate the signature of the image that it will boot, and this takes a bit of time.&lt;br /&gt;You can try to speed up the boot process by setting CONFIG_BOOT_VALIDATE_SLOT0=n and/or&amp;nbsp;BOOT_VALIDATE_SLOT0_ONCE=y&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.9.99-ncs3/boot/zephyr/Kconfig#L178"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/v1.9.99-ncs3/boot/zephyr/Kconfig#L178&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Boot up time of NCS application</title><link>https://devzone.nordicsemi.com/thread/444039?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 09:11:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcfbe995-aa15-469f-bcc3-51c955f2f9c1</guid><dc:creator>trafficode</dc:creator><description>&lt;p&gt;I set gpio pin when I reach while(1){} in main(). It means that pin is set if device is initialized and ready to work. Then I observe VDD and this pin on oscilloscope. Thats haw I&amp;#39;m doing boot up measurements.&lt;/p&gt;
&lt;p&gt;Why it is critical... Device is based on DALI interface. Standard require that device/driver has to answer to query no longer than 450ms after mains appear on device. And this procedure(power cycle and query) is automated by certified by &amp;quot;DALI Alliance&amp;quot; tester device. To meet worldwide requirements and to put sticker into device I need to met this requirement...&lt;/p&gt;
&lt;p&gt;Specific electronics gives 300ms overhead between mains and vdd appear. Thats why 150ms is so critical.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Boot up time of NCS application</title><link>https://devzone.nordicsemi.com/thread/444034?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 08:59:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c049680-da13-403a-8cdf-ae0099d86096</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1) How are you measuring this? Is it when you e.g. reach main() in your app?&lt;/p&gt;
&lt;p&gt;2)&amp;nbsp;Can you&amp;nbsp;elaborate on what makes it critical you start up very fast? Do you need to e.g. set some GPIO pin high within x time, or send some data over UART, etc ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>