<?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>Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74554/application-firmware-is-around-200ms-slower-to-start-after-a-bluetooth-dfu</link><description>Hi, 
 I found that after a DFU my application is slower to start up by about 200ms. However when programmed initially (via a physical connection) its fine. Its only after the DFU (with the same firmware there is a problem). 
 I toggled some lines to find</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 May 2021 08:31:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74554/application-firmware-is-around-200ms-slower-to-start-after-a-bluetooth-dfu" /><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/308470?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 08:31:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8caa59ab-d55f-462f-9ed8-f6802c4d1eed</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;That&amp;#39;s correct.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/308372?ContentTypeID=1</link><pubDate>Wed, 05 May 2021 13:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa8238fa-1d08-4563-a112-7f7947ed5395</guid><dc:creator>Liam</dc:creator><description>&lt;div&gt;If I set&amp;nbsp;&lt;span&gt;&amp;nbsp;--sd-boot-validation NO_VALIDATION will the softdevice still get CRC checked after a DFU update that includes a softdevice? But once its passed that it won&amp;#39;t be checked again?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Liam&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/308298?ContentTypeID=1</link><pubDate>Wed, 05 May 2021 08:17:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cd8fc42-f3a6-4a44-9c84-26ca429e75e1</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Liam,&lt;/p&gt;
[quote user="hazeman"]Is it expected the CRC should only be checked immediately after a DFU not every power up (as appears to be the case here)?[/quote]
&lt;p&gt;The bootloader will check CRC after reboot.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="hazeman"]is it possible to stop the CRC checking of the soft device using this command?[/quote]
&lt;p&gt;Yes, you can generate the setting with the config&amp;nbsp;--sd-boot-validation NO_VALIDATION.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/308212?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 13:44:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eea7866-b189-4305-97b0-d8d0a903e572</guid><dc:creator>Liam</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;It appears to me when the softdevice is updated over the DFU the range of addresses checked is extended to include it.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know why&amp;nbsp;&lt;span&gt;NRF_POWER_RESETREAS_OFF_MASK is not being returned - the device is definitely being powered up from off. Is it expected the CRC should only be checked immediately after a DFU not every power up (as appears to be the case here)?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;These are my settings&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nrfutil settings display SimRDS200_V2_01.hex&lt;/p&gt;
&lt;p&gt;Bad access at 0x7F000: not enough data to read 4 contiguous bytes&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Bootloader DFU Settings:&lt;/p&gt;
&lt;p&gt;* File:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SimRDS200_V2_01.hex&lt;/p&gt;
&lt;p&gt;* Family:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF52840&lt;/p&gt;
&lt;p&gt;* Start Address:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000000&lt;/p&gt;
&lt;p&gt;* CRC:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x3CAB1BC1&lt;/p&gt;
&lt;p&gt;* Settings Version:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000001 (1)&lt;/p&gt;
&lt;p&gt;* App Version:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000001 (1)&lt;/p&gt;
&lt;p&gt;* Bootloader Version:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000001 (1)&lt;/p&gt;
&lt;p&gt;* Bank Layout:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000000&lt;/p&gt;
&lt;p&gt;* Current Bank:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000000&lt;/p&gt;
&lt;p&gt;* Application Size:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00014C0C (85004 bytes)&lt;/p&gt;
&lt;p&gt;* Application CRC:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x79B2BCC7&lt;/p&gt;
&lt;p&gt;* Bank0 Bank Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000001&lt;/p&gt;
&lt;p&gt;* Softdevice Size:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000000 (0 bytes)&lt;/p&gt;
&lt;p&gt;* Boot Validation CRC:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000000&lt;/p&gt;
&lt;p&gt;* SD Boot Validation Type:&amp;nbsp; 0x00000000 (0)&lt;/p&gt;
&lt;p&gt;* App Boot Validation Type: 0x00000000 (0)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Generated by&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nrfutil settings generate --family NRF52840 --application %APPLICATION_HEX_PATH% --application-version 1 --bootloader-version 1 --bl-settings-version 1 %SETTINGS_HEX% &amp;gt;nul 2&amp;gt;nul&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So is it possible to stop the CRC checking of the soft device using this command? and is it desirable in a production setting?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Liam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/307879?ContentTypeID=1</link><pubDate>Mon, 03 May 2021 11:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a32d9806-e993-428d-83c1-86c7addfbbce</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Liam,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The CRC check will depend on the length of the application firmware. If your application is large, the time sounds plausible.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="hazeman"]So&amp;nbsp;crc_on_valid_app_required() is returning true even though&amp;nbsp;NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET and&amp;nbsp;NRF_BL_APP_CRC_CHECK_SKIPPED_ON_GPREGRET2 are set true.[/quote]
&lt;p&gt;&lt;span&gt;crc_on_valid_app_required() return true when the chip is reset by a wake from System OFF (config&amp;nbsp;&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/group__nrf__bootloader__config.html#ga43051a9dcb0e68d8c415b09ab28e589e"&gt;NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET&lt;/a&gt;), or when GPREGRET2 register is set (config&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/group__nrf__bootloader__config.html#gae5beef093d98f33676857579e2ce724a"&gt;NRF_BL_APP_CRC_CHECK_SKIPPED_ON_GPREGRET2&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="hazeman"]It looks like&amp;nbsp;nrf_power_resetreas_get is not returning with&amp;nbsp;NRF_POWER_RESETREAS_OFF_MASK set?[/quote]
&lt;p&gt;&lt;span&gt;Maybe the device is not reset by a wake from System OFF.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There is also an option to select no boot validation when you generate the settings page. So another easier option could be to create a settings page to use during development which has boot validation of the application disabled. This settings page can be loaded automatically like we do with the Softdevice.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/269055_5F00_1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="hazeman"]what would be the risks of disabling the CRC check in the bootloader?[/quote]
&lt;p&gt;&lt;span&gt;At the start of the DFU process, the CRC inside the initpacket is stored in the bootloader settings page. The CRC check is done at the end of the DFU process, where we calculate the CRC of the received FW image, and compare it to the CRC stored in the bootloader settings page at the beginning of the DFU process. This is to ensure the integrity of the image. It might be easier in development, but I think this is dangerous and should not be used in an end product.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/307630?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 09:57:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb06de15-9062-429a-9524-97cb78772277</guid><dc:creator>Liam</dc:creator><description>&lt;p&gt;Also what would be the risks of disabling the CRC check in the bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/307628?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 09:51:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27210353-5832-4ca1-a46f-040fc063e089</guid><dc:creator>Liam</dc:creator><description>&lt;p&gt;That was already enabled. Disabling made no difference.&lt;/p&gt;
&lt;p&gt;However waggling pins either side of&amp;nbsp;crc32_compute in&amp;nbsp;nrf_dfu_validation_boot_validate() shows this where the time is being taken up. 100ms before DFU, 330ms afterwards.&lt;/p&gt;
&lt;p&gt;So&amp;nbsp;crc_on_valid_app_required() is returning true even though&amp;nbsp;NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET and&amp;nbsp;NRF_BL_APP_CRC_CHECK_SKIPPED_ON_GPREGRET2 are set true.&lt;/p&gt;
&lt;p&gt;It looks like&amp;nbsp;nrf_power_resetreas_get is not returning with&amp;nbsp;NRF_POWER_RESETREAS_OFF_MASK set?&lt;/p&gt;
&lt;p&gt;Liam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/307602?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 07:01:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:086a48ae-6ae6-4591-b2c8-a99fc33f775d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Liam,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It might be cause of some CRC calculation of the image in the bootloader. If so, could enable NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET to&amp;nbsp;skip CRC calculation in the bootloader sdk_config.h.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application firmware is around 200ms slower to start after a bluetooth DFU</title><link>https://devzone.nordicsemi.com/thread/307410?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 09:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ceda668-12bf-4b57-958e-5f8c5739612b</guid><dc:creator>Liam</dc:creator><description>&lt;p&gt;As I said we include the softdevice in the update package using the following&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;nrfutil pkg generate --application %APPLICATION_HEX_PATH% --application-version 1 --application-version-string &amp;quot;1.0.0&amp;quot; --hw-version 52 --sd-req 0xB6 --sd-id 0xB6 --softdevice %SOFT_DEVICE_PATH_HEX% --key-file %PRIVATE_KEY_PATH% %UPGRADE_FW_PATH%&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;When I removed the softdevice from the upgrade package everything was OK and as you would expect the process was quicker.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m happy to do this as a fix but would like to understand how this will affect us if we need to update the SD in future ( we are currently using&amp;nbsp;s140_nrf52_6.1.1_softdevice.hex) ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>