<?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>nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91561/nrf52820-softdevice-dfu</link><description>Hi, 
 I managed to do a DFU with an application on a nRF52820. Now I wanted to test if I can also update the softdevice. For this I read the following article: infocenter.nordicsemi.com/index.jsp Under the point &amp;quot;Single-bank updates&amp;quot; I saw that with a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 05 Nov 2022 03:48:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91561/nrf52820-softdevice-dfu" /><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/394251?ContentTypeID=1</link><pubDate>Sat, 05 Nov 2022 03:48:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e2518cb-3337-4f7d-9e6d-87894b07e2d9</guid><dc:creator>DANG CONG TAO</dc:creator><description>&lt;p&gt;Hi, I Cannot find the macro &amp;quot;&lt;span&gt;&lt;strong&gt;NRF_DFU_APP_DOWNGRADE_PREVENTION&lt;/strong&gt;&amp;quot; in the header &amp;quot;&lt;strong&gt;sdk_config.h&lt;/strong&gt;&amp;quot;.&lt;br /&gt;I&amp;#39;m using nRF SDK version 15.3.0&lt;br /&gt;&lt;br /&gt;Could you help me how to find it?&lt;/span&gt;&lt;/p&gt;
&lt;div id="eJOY__extension_root" class="eJOY__extension_root_class"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/389663?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 14:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9598dff9-b384-42ed-90f1-ca15e980184b</guid><dc:creator>Louis_263</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;the softdevice+application DFU worked with nrfutil version 6.1.7. Thank you for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/388774?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2022 12:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be87c3f-a9e0-4b1d-b893-70bbf25336ea</guid><dc:creator>Louis_263</dc:creator><description>&lt;p&gt;I can confirm that with nrfutil version 6.1.7 the FWID 0x00 does not appear in the output from &amp;#39;nrfutil pkg display &amp;#39;ZIP_FILE&amp;#39; command. I didn&amp;#39;t manage to test the DFU today, but I will get back to you on this next week ;-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/388676?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2022 07:52:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2162bae8-6a5f-412b-afea-1e834f0f70ee</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I don&amp;#39;t see any problems with what you have done so far.&lt;/p&gt;
&lt;p&gt;The only way the application update will be allowed to overwrite the Softdevice is if the signed init command for the app contains 0x00 in its&amp;nbsp; SD FWID list as shown below.&lt;/p&gt;
&lt;p&gt;Output from &amp;#39;nrfutil pkg display &amp;#39;ZIP_FILE&amp;#39; command:&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/6242.pastedimage1664524269750v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/388597?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 13:59:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35da7603-3ad1-4333-9b7c-f687657e3eab</guid><dc:creator>Louis_263</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for the quick reply, I will try it and get back to you.&lt;/p&gt;
&lt;p&gt;Maybe I&amp;#39;ll list here again all the steps I&amp;#39;ve done so far, then maybe you can check if everything is correct.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I took the UART secure bootloader project as is, and used the following preprocessor symbols for me:
&lt;ul&gt;
&lt;li&gt;CONFIG_GPIO_AS_PINRESET&lt;br /&gt;FLOAT_ABI_SOFT&lt;br /&gt;NRF52820_XXAA&lt;br /&gt;BOARD_PCA10100&lt;br /&gt;NRF_DFU_SINGLE_BANK_APP_UPDATES=1&lt;br /&gt;NRF_DFU_FORCE_DUAL_BANK_APP_UPDATES=0&lt;br /&gt;NRF_DFU_SETTINGS_VERSION=2&lt;br /&gt;SVC_INTERFACE_CALL_AS_NORMAL_FUNCTION&lt;br /&gt;__HEAP_SIZE=0&lt;br /&gt;uECC_ENABLE_VLI_API=0&lt;br /&gt;uECC_OPTIMIZATION_LEVEL=3&lt;br /&gt;uECC_SQUARE_FUNC=0&lt;br /&gt;uECC_SUPPORT_COMPRESSED_POINT=0&lt;br /&gt;uECC_VLI_NATIVE_LITTLE_ENDIAN=1&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;I generate the bootloader settings for my project, consisting of softdevice, app and bootloader, with the following command:
&lt;ul&gt;
&lt;li&gt;nrfutil settings generate --family NRF52QFAB --application app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;With a custom command I jump from the application into the bootloader (GPREGRET method) and thus trigger a DFU&lt;/li&gt;
&lt;li&gt;I generate the DFU package with the following command:
&lt;ul&gt;
&lt;li&gt;nrfutil pkg generate --hw-version 52 --application app.hex --application-version 1 --sd-req 0x00,0x100 --sd-id 0x100 --softdevice s140_nrf52_7.2.0_softdevice.hex --key-file private_key.pem app_sd_dfu_package.zip&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;During the DFU the old softdevice and the old application should be deleted and replaced 1&amp;nbsp;to 1 at the same location in flash memory by the new softdevice and the new application&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/388537?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 10:53:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:507b0195-780e-4dee-983e-2ec7eec51094</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Louis,&lt;/p&gt;
&lt;p&gt;Thanks. I see from your command that you are correctly setting the FWID requirements so you are likely experiencing this bug that was addressed in nrfutil v6.1.7:&amp;nbsp; &lt;a id="" href="https://github.com/NordicSemiconductor/pc-nrfutil/releases"&gt;https://github.com/NordicSemiconductor/pc-nrfutil/releases&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Please upgrade nrfutil and try again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/388527?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 10:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70e64d90-aa3c-45e5-896f-5ff2f24bdb63</guid><dc:creator>Louis_263</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;this is the command I used:&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --application app.hex --application-version 1 --sd-req 0x00,0x100 --sd-id 0x100 --softdevice s140_nrf52_7.2.0_softdevice.hex --key-file private_key.pem app_sd_dfu_package.zip&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Louis&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/388516?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 10:10:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12cf30a5-7b75-452f-9d00-ad28c7e8ff5f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Louis,&lt;/p&gt;
&lt;p&gt;The init command for the application update must include the FWID of the Softdevice the app was built for (i.e. 0x0100 if you still use s140 v7.2.0), and not &lt;strong&gt;0x00&lt;/strong&gt;. When the FWID is 0x00, it tells the bootloader that the application is meant to run without the Softdevice, so it will overwrite it.&lt;/p&gt;
&lt;p&gt;Can you post the command you used to make the combined Softdevice+application update package?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/388345?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 12:17:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76bd3dff-82b2-4fa6-b78a-c25dd9f579e7</guid><dc:creator>Louis_263</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I have tried the solution approach and the transfer of the DFU also works without problems, I get displayed: &amp;quot;Device programmed&amp;quot;.&lt;br /&gt;However, after the DFU (App+Softdevice), the application no longer starts. I looked at the memory after the DFU and discovered an anomaly, see the image below:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1664367399570v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;There is a &amp;quot;gap&amp;quot; in the softdevice and I don&amp;#39;t know why it is there. Maybe it means that the application is no longer being called.&lt;br /&gt;Maybe you can help me.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Update:&lt;/p&gt;
&lt;p&gt;I found out that the actual application is written to the beginning of the softdevice (see the following pictures). How can this happen? &lt;br /&gt;Can&amp;#39;t the memory area of the softdevice simply be deleted and then the new softdevice be written there? And the same with the application. I don&amp;#39;t understand why the application is written to the beginning of the softdevice area.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1664374295925v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1664374308126v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;This is the log of the DFU of the application (executed after the DFU of the softdevice):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/log_5F00_wrong_5F00_dfu.txt"&gt;devzone.nordicsemi.com/.../log_5F00_wrong_5F00_dfu.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There you can see that somehow this does not work as I imagined. The cache_address is initially set to 0x27000 (i.e. the start of the application) and is then set to 0x1000 (i.e. the start of the softdevice).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Louis&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/384927?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 07:00:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ed81005-14dc-429f-bc9d-f8a09b97c230</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Louis,&lt;/p&gt;
&lt;p&gt;I am sorry for the confusion. I meant to say that you had to &amp;quot;disable NRF_DFU_APP_DOWNGRADE_PREVENTION&amp;quot;, not to enable it. It makes sense that you can&amp;#39;t overwrite the SD with NRF_DFU_APP_DOWNGRADE_PREVENTION enabled.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/384622?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 14:08:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b1b9aeb-ba29-4e1e-b15a-f27b61aede11</guid><dc:creator>Louis_263</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;thanks for your response. With the above adjustments, I get the following error:&lt;/p&gt;
&lt;p&gt;Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.&lt;/p&gt;
&lt;p&gt;If I omit the NRF_DFU_APP_DOWNGRADE_PREVENTION and use as command&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;nrfutil pkg generate --hw-version 52 --sd-req 0x00 --softdevice s140_nrf52_7.2.0_softdevice.hex --key-file private.pem app_dfu_package_sd_s140.zip&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;then it works. Does that make sense?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Louis&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52820 softdevice DFU</title><link>https://devzone.nordicsemi.com/thread/384595?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 13:16:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9edcd3b-593f-4d9e-b85f-a9aab92183b3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Louis,&lt;/p&gt;
&lt;p&gt;In addition to having NRF_DFU_SINGLE_BANK_APP_UPDATES, please try to &lt;span style="text-decoration:line-through;"&gt;enable&lt;/span&gt;&amp;nbsp; disable NRF_DFU_APP_DOWNGRADE_PREVENTION and add 0x00 to your --sd-req list. This should allow you to overwrite an existing softdevice.&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --sd-req &lt;strong&gt;0x00&lt;/strong&gt;, 0x100 --softdevice s140_nrf52_7.2.0_softdevice.hex --key-file private.pem app_dfu_package_sd_s140.zip&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>