<?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>nRF52840 startup delay</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81498/nrf52840-startup-delay</link><description>Hi, 
 We are facing a very long startup delay with nRF52840 and I would know if there are some possibilities to reduce it. 
 I have made some measurements in different configurations. The delay has been measured by toggling a GPIO at the start of PRE_KERNEL_2</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Nov 2021 14:54:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81498/nrf52840-startup-delay" /><item><title>RE: nRF52840 startup delay</title><link>https://devzone.nordicsemi.com/thread/340135?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 14:54:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c28059db-68e4-495b-a4fc-630985379d15</guid><dc:creator>Romain</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Indeed this is ~434ms faster when I set CONFIG_ENTROPY_CC3XX=n&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 startup delay</title><link>https://devzone.nordicsemi.com/thread/339860?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 14:51:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72ba6bdf-7444-4eac-9c14-ab382c8e7491</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It is the function&amp;nbsp;&lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/6b752db034806bf81cffae1af82e53108db4b71d/drivers/hw_cc310/hw_cc310.c#l28" href="https://github.com/nrfconnect/sdk-nrf/blob/6b752db034806bf81cffae1af82e53108db4b71d/drivers/hw_cc310/hw_cc310.c#L28" rel="noopener noreferrer" target="_blank"&gt;nrf_cc3xx_platform_init()&lt;/a&gt;&amp;nbsp;specifically that causes the long startup time.&lt;/p&gt;
&lt;div&gt;You need to initialize the RNG engine in CryptoCell and it takes time.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;The only option is to not use the nrf_cc3xx for the RNG driver and instead use nRF5 HW peripheral.&amp;nbsp;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;The nRF5 RNG is simpler than the CryptoCell RNG.&amp;nbsp;There are some differences between these, as stated in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Flib_crypto_rng.html"&gt;nRF5 SDK documentation --&amp;gt; RNG&lt;/a&gt;:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;CryptoCell CC310 (default for devices with CC310)&lt;/li&gt;
&lt;li&gt;nRF HW RNG peripheral:
&lt;ul&gt;
&lt;li&gt;CTR-DRBG mode using mbed TLS (default for devices without CC310)&lt;/li&gt;
&lt;li&gt;Raw mode&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CC310 is the preferred backend on devices that support it, as it meets the NIST 800-90B3 and AIS-31 (Class “P2 High”) standards. The nRF HW RNG backend is available on all nRF5 devices. Devices that do not include CC310 should normally use the nRF HW RNG with mbed TLS CTR-DRBG. The mbed TLS CTR-DRBG code is standardized by NIST (&lt;a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf" rel="noopener noreferrer" target="_blank"&gt;NIST SP 800-90A Revision 1&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 startup delay</title><link>https://devzone.nordicsemi.com/thread/339414?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 12:03:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc7be9fb-5cf1-4e68-a240-076b75603d70</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I did some measurements with an nRF52840 DK using the external 32k without MCUboot, running the BLE peripheral UART sample with the SoftDevice Controller (forgot to enable SPI)&lt;/p&gt;
&lt;p&gt;I saw that&amp;nbsp;the function&amp;nbsp;mpsl_lib_init took 250 ms, which is expected, since it&amp;#39;s waiting for the 32 kHz clock to get started (see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/16027/is-it-possible-to-decrease-the-softdevice-start-time/61113#61113"&gt;ticket 116026&lt;/a&gt;). I&amp;nbsp;saw that the function&amp;nbsp;hw_cc3xx_init_internal() used 434ms. I&amp;nbsp;will ask internally about the hw_cc3xx function and get back to you.&lt;/p&gt;
&lt;p&gt;I tried to measure at the same places as you, at the start of pre kernel&amp;nbsp;2 and at the start of start of main, but it only took 54ms. However, the execution time of pre kernel 1 took 685ms (~=250ms + 434ms).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 startup delay</title><link>https://devzone.nordicsemi.com/thread/339336?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 07:07:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8361839-de15-41bd-a7b5-915009cd12f8</guid><dc:creator>Romain</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Any news on that ?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Romain&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 startup delay</title><link>https://devzone.nordicsemi.com/thread/338026?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 23:32:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80e6ee3c-856d-4f61-be4c-e1b1d5179d7f</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;ll take a look at this tomorrow&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>