<?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>Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84796/serial-lte-modem-application-nrf9160-fota-does-not-apply-new-update</link><description>Hi, 
 I have the SLM application running in a custom board with uses the NRF9160. The SLM is driven an external microprocessor within the same board. Everything seems to work but FOTA will not apply the update. 
 Basically, we send the following commands</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Mar 2022 10:01:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84796/serial-lte-modem-application-nrf9160-fota-does-not-apply-new-update" /><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/357090?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 10:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c0e2ec9-9ed8-4bee-9e98-1e8c4ef65370</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ronald-swiftlabs"]&lt;p&gt;I was able to make it work but I have to remove one of the required configuration I have to use in my project. I have this config defined:&lt;/p&gt;
&lt;p&gt;CONFIG_SLM_START_SLEEP=y&lt;/p&gt;
&lt;p&gt;Whenever I removed this configuration in the project, the actual image swap is successful. If I put it back in, the swap reverts back (thus failing). I investigated and whenever the following APIs are called (in main.c) ...&lt;/p&gt;
&lt;p&gt;nrf_power_resetreas_get(NRF_POWER_NS);&lt;br /&gt;nrf_power_resetreas_clear(NRF_POWER_NS, 0x70017);&lt;/p&gt;
&lt;p&gt;... the swap fails.&lt;/p&gt;
&lt;p&gt;As a workaround I moved the following calls before the *nrf_power_resetreas_* APIs:&lt;/p&gt;
&lt;p&gt;handle_nrf_modem_lib_init_ret();&lt;br /&gt;handle_mcuboot_swap_ret();&lt;/p&gt;[/quote]
&lt;p&gt;I just wanted to notify you that we have a proposed fix merged to main branch now:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/7040"&gt;https://github.com/nrfconnect/sdk-nrf/pull/7040&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/354738?ContentTypeID=1</link><pubDate>Thu, 24 Feb 2022 08:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22e07811-bd6c-4d43-95ab-db3dc66f88a5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you very much for the detailed update.&lt;/p&gt;
[quote user="ronald-swiftlabs"]&lt;p&gt;I was able to make it work but I have to remove one of the required configuration I have to use in my project. I have this config defined:&lt;/p&gt;
&lt;p&gt;CONFIG_SLM_START_SLEEP=y&lt;/p&gt;
&lt;p&gt;Whenever I removed this configuration in the project, the actual image swap is successful. If I put it back in, the swap reverts back (thus failing). I investigated and whenever the following APIs are called (in main.c) ...&lt;/p&gt;
&lt;p&gt;nrf_power_resetreas_get(NRF_POWER_NS);&lt;br /&gt;nrf_power_resetreas_clear(NRF_POWER_NS, 0x70017);&lt;/p&gt;
&lt;p&gt;... the swap fails.&lt;/p&gt;[/quote]
&lt;p&gt;Yes, I can see that this scenario will fail on my end as well. I have submitted a bug report internally on the SLM project to make the developers aware of this issue! Thank you for updating and helping us improve the application!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ronald-swiftlabs"]&lt;p&gt;As a workaround I moved the following calls before the *nrf_power_resetreas_* APIs:&lt;/p&gt;
&lt;p&gt;handle_nrf_modem_lib_init_ret();&lt;br /&gt;handle_mcuboot_swap_ret();&lt;/p&gt;
&lt;p&gt;This actually makes swapping successful although the FOTA completion message says otherwise:&lt;/p&gt;
&lt;p&gt;#XFOTA: 5,1,-9&lt;/p&gt;
&lt;p&gt;This is the last issue Im looking and I think the swapping issue is now behind us.&lt;/p&gt;[/quote]
&lt;p&gt;I believe that the XFOTA return error&amp;nbsp;is a issue that was recently fixed in ncs v1.9.0:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/6918"&gt;https://github.com/nrfconnect/sdk-nrf/pull/6918&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/354679?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 17:53:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:208699ec-288a-4713-991a-27e1ac7ffd62</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;I was able to make it work but I have to remove one of the required configuration I have to use in my project. I have this config defined:&lt;/p&gt;
&lt;p&gt;CONFIG_SLM_START_SLEEP=y&lt;/p&gt;
&lt;p&gt;Whenever I removed this configuration in the project, the actual image swap is successful. If I put it back in, the swap reverts back (thus failing). I investigated and whenever the following APIs are called (in main.c) ...&lt;/p&gt;
&lt;p&gt;nrf_power_resetreas_get(NRF_POWER_NS);&lt;br /&gt;nrf_power_resetreas_clear(NRF_POWER_NS, 0x70017);&lt;/p&gt;
&lt;p&gt;... the swap fails.&lt;/p&gt;
&lt;p&gt;As a workaround I moved the following calls before the *nrf_power_resetreas_* APIs:&lt;/p&gt;
&lt;p&gt;handle_nrf_modem_lib_init_ret();&lt;br /&gt;handle_mcuboot_swap_ret();&lt;/p&gt;
&lt;p&gt;This actually makes swapping successful although the FOTA completion message says otherwise:&lt;/p&gt;
&lt;p&gt;#XFOTA: 5,1,-9&lt;/p&gt;
&lt;p&gt;This is the last issue Im looking and I think the swapping issue is now behind us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/354590?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 13:24:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1e84d9c-1d6f-414d-8be3-357c8f82e1b5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ronald-swiftlabs"]How do&amp;nbsp;I verify this?[/quote]
&lt;p&gt;Do you have the original build (and artifacts, such as the partitions.yml?)?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you confirm if the &amp;quot;update images&amp;quot; gets executed at all, or is it specifically only the &amp;quot;boot_write_img_confirmed()&amp;quot; that is not making the image permanent? From the logs that you have provided, it seems that the app_*.hex files does not seem to&amp;nbsp;run properly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/354405?ContentTypeID=1</link><pubDate>Tue, 22 Feb 2022 15:37:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65cef8b7-8219-45c0-9249-658de6d72d46</guid><dc:creator>ronald-blackline</dc:creator><description>[quote userid="2115" url="~/f/nordic-q-a/84796/serial-lte-modem-application-nrf9160-fota-does-not-apply-new-update/354079#354079"]Meaning, are you certain that the static addresses are indeed matching those that your mcuboot expects?[/quote]
&lt;p&gt;How do&amp;nbsp;I verify this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/354079?ContentTypeID=1</link><pubDate>Mon, 21 Feb 2022 09:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:160f063e-2ae5-480a-985d-989c0c364dab</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ronald-swiftlabs"]i tried programming the app_moved_test_update.hex but the result is the same, getting reverted back.[/quote]
&lt;p&gt;Are you certain that the original pm_static.yml is the one that you&amp;#39;re currently using?&lt;/p&gt;
&lt;p&gt;Meaning, are you certain that the static addresses are indeed matching those that your mcuboot expects?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I do not see this by using your initial pm_static.yml, but that might also be because I use that as the &amp;quot;starting point&amp;quot; to ensure that the partition layout is equal for the pending update image.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What I did for testing your process:&lt;/p&gt;
&lt;p&gt;* used your pm_static.yml, and set FPROTECT off.&lt;/p&gt;
&lt;p&gt;* Configured ncs v1.5.0 SLM and flashed that.&lt;/p&gt;
&lt;p&gt;* checked out ncs v1.8.0, reconfigured SLM&lt;/p&gt;
&lt;p&gt;* Changed the printout, just to see that the image booted (from &amp;quot;Ready&amp;quot; to &amp;quot;Update Ready&amp;quot;)&lt;/p&gt;
&lt;p&gt;* flashed the ncs v1.8.0 &amp;quot;app_moved_test_update.hex&amp;quot; using nrfjprog into the mcuboot secondary slot (starting at 0x75000).&lt;/p&gt;
&lt;p&gt;* Reset the board,&amp;nbsp;and saw that the image booted and printed my modified string (ie. Update Ready).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;* (optional step) call boot_write_img_confirmed() on the ncs v1.8.0 image to make the new image permanent. If this is not done, the image will revert to ncs v1.5.0 on the next reset.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353900?ContentTypeID=1</link><pubDate>Fri, 18 Feb 2022 15:08:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a1d3b50-a1e4-4e95-8496-5c927c9de324</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;i tried programming the app_moved_test_update.hex but the result is the same, getting reverted back.&lt;/p&gt;
&lt;p&gt;This is also how i changed the main code (snippet of start_execute):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	LOG_INF(&amp;quot;Serial LTE Modem&amp;quot;);

	/* Init and load settings */
	err = slm_settings_init();
	if (err) {
		LOG_ERR(&amp;quot;Failed to init slm settings: %d&amp;quot;, err);
		return;
	}

	LOG_DBG(&amp;quot;fota_stage: %d&amp;quot;, fota_stage);
	///* Post-FOTA handling */
	//if (fota_stage != FOTA_STAGE_INIT) {
	//	handle_nrf_modem_lib_init_ret();
	//	handle_mcuboot_swap_ret();
	//}

	err = boot_write_img_confirmed();
	if (err) {
		fota_status = FOTA_STATUS_ERROR;
		fota_info = err;
	} else {
		fota_status = FOTA_STATUS_OK;
		fota_info = 0;
	}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Other than the change in slm_at_host, have you changed something else?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353783?ContentTypeID=1</link><pubDate>Fri, 18 Feb 2022 09:01:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f828b172-8707-4e51-b491-614c710ae5f1</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ronald-swiftlabs"]First question is, are the files (pm_static.yml and paritions.yml) looks correct?[/quote]
&lt;p&gt;Yes, they match.&lt;/p&gt;
[quote user="ronald-swiftlabs"]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Second, after the swap, when it jumps to the image in slot0, does that mean it is calling the &amp;quot;update&amp;quot;?&lt;/p&gt;[/quote]
&lt;p&gt;&amp;quot;test&amp;quot; means that it is now copying the image from the secondary slot to the primary slot, and will boot it.&lt;/p&gt;
[quote user="ronald-swiftlabs"]As for the call to boot_write_img_confirmed(), i forced calling that function in the current firmware and in the new update application.[/quote]
&lt;p&gt;In the build-folder/zephyr/ folder, there should be several .hex files. If you have hardcoded the new application to call boot_write_img_confirmed(), you can flash the file:&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;app_moved_test_update.hex&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;using nrfjprog directly:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --program build-folder/zephyr/app_moved_test_update.hex --sectorerase -f nrf91&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then either reset via a button, or &amp;quot;nrfjprog --reset&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Does this procedure work as expected on your end?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I flashed SLM to my board, saw that it booted as expected, by printing &amp;quot;Ready&amp;quot; on the UART console.&lt;/p&gt;
&lt;p&gt;Then changed the string in slm_at_host.c::SLM_SYNC_STR (line 27 in ncs v1.8.0), and flashed the &amp;quot;app_moved_test_update.hex&amp;quot; directly, and saw that it now printed my changed string.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353651?ContentTypeID=1</link><pubDate>Thu, 17 Feb 2022 14:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b70ebd23-255b-4143-88ea-8ae631f33061</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;First question is, are the files (pm_static.yml and paritions.yml) looks correct?&lt;/p&gt;
&lt;p&gt;Second, after the swap, when it jumps to the image in slot0, does that mean it is calling the &amp;quot;update&amp;quot;?&lt;/p&gt;
&lt;p&gt;As for the call to boot_write_img_confirmed(), i forced calling that function in the current firmware and in the new update application.&lt;/p&gt;
&lt;p&gt;Im also using the SLM application which sees this issue. However, the http_update application works fine. So im thinking there is something different the SLM is doing compare to the http_update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353642?ContentTypeID=1</link><pubDate>Thu, 17 Feb 2022 14:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4729b63f-a71e-4564-9b01-2cc647df9d3e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is hard to say what happens here, as there&amp;#39;s no application logs between the &amp;quot;test&amp;quot; and the &amp;quot;revert&amp;quot; boot log.&lt;/p&gt;
&lt;p&gt;In your new update application, do you call &amp;quot;&lt;span&gt;boot_write_img_confirmed()&amp;quot; after booting?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If&amp;nbsp;this function is not called, then it will revert on the next reset.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does the application reboot itself, or do you manually trigger a reset?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Håkon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353461?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 19:51:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02ef4f9c-89c9-45ec-a162-ba1a6f3d1237</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;So i fixed the issue &amp;quot;Protect mcuboot flash failed, cancel startup&amp;quot; by defining &amp;quot;CONFIG_FPROTECT=n&amp;quot; in the mcuboot.conf (in &amp;quot;serial_lte_modem/child_image&amp;quot; folder). However, even with the board files ported properly, Im back seeing the original problem:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;00&amp;gt; *** Booting Zephyr OS build v2.7.0-ncs1 ***&lt;br /&gt;00&amp;gt; I: Starting bootloader&lt;br /&gt;00&amp;gt; I: Primary image: magic=good, swap_type=0x4, copy_done=0x1, image_ok=0x1&lt;br /&gt;00&amp;gt; I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3&lt;br /&gt;00&amp;gt; I: Boot source: none&lt;br /&gt;00&amp;gt; I: Swap type: test&lt;br /&gt;00&amp;gt; D: erasing trailer; fa_id=2&lt;br /&gt;00&amp;gt; D: initializing status; fa_id=2&lt;br /&gt;00&amp;gt; D: writing swap_info; fa_id=2 off=0x68fd8 (0x74fd8), swap_type=0x2 image_num=0x0&lt;br /&gt;00&amp;gt; D: writing swap_size; fa_id=2 off=0x68fd0 (0x74fd0)&lt;br /&gt;00&amp;gt; D: writing magic; fa_id=2 off=0x68ff0 (0x74ff0)&lt;br /&gt;00&amp;gt; D: erasing trailer; fa_id=6&lt;br /&gt;00&amp;gt; D: writing copy_done; fa_id=2 off=0x68fe0 (0x74fe0)&lt;br /&gt;00&amp;gt; I: Bootloader chainload address offset: 0xc000&lt;br /&gt;00&amp;gt; I: Jumping to the first image slot&lt;br /&gt;00&amp;gt; *** Booting Zephyr OS build v2.7.0-ncs1 ***&lt;br /&gt;00&amp;gt; I: Starting bootloader&lt;br /&gt;00&amp;gt; I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x3&lt;br /&gt;00&amp;gt; I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;00&amp;gt; I: Boot source: none&lt;br /&gt;00&amp;gt; I: Swap type: revert&lt;br /&gt;00&amp;gt; I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;00&amp;gt; D: erasing trailer; fa_id=6&lt;br /&gt;00&amp;gt; D: writing image_ok; fa_id=6 off=0x68fe8 (0xddfe8)&lt;br /&gt;00&amp;gt; D: writing swap_size; fa_id=6 off=0x68fd0 (0xddfd0)&lt;br /&gt;00&amp;gt; D: writing magic; fa_id=6 off=0x68ff0 (0xddff0)&lt;br /&gt;00&amp;gt; D: erasing trailer; fa_id=2&lt;br /&gt;00&amp;gt; D: initializing status; fa_id=2&lt;br /&gt;00&amp;gt; D: writing swap_info; fa_id=2 off=0x68fd8 (0x74fd8), swap_type=0x4 image_num=0x0&lt;br /&gt;00&amp;gt; D: writing image_ok; fa_id=2 off=0x68fe8 (0x74fe8)&lt;br /&gt;00&amp;gt; D: writing swap_size; fa_id=2 off=0x68fd0 (0x74fd0)&lt;br /&gt;00&amp;gt; D: writing magic; fa_id=2 off=0x68ff0 (0x74ff0)&lt;br /&gt;00&amp;gt; D: erasing trailer; fa_id=6&lt;br /&gt;00&amp;gt; D: writing copy_done; fa_id=2 off=0x68fe0 (0x74fe0)&lt;br /&gt;00&amp;gt; I: Bootloader chainload address offset: 0xc000&lt;br /&gt;00&amp;gt; I: Jumping to the first image slot&lt;/p&gt;
&lt;p&gt;I already attached the file &amp;quot;pm_static.yml&amp;quot; in the previous reply. Below is the generated &amp;quot;partitions.yml&amp;quot; file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0xfc000
  end_address: 0xfe000
  region: flash_primary
  size: 0x2000
app:
  address: 0x18200
  end_address: 0x75000
  region: flash_primary
  size: 0x5ce00
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  end_address: 0xc200
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xc000
  end_address: 0x75000
  region: flash_primary
  size: 0x69000
  span:
  - spm
  - mcuboot_pad
  - app
mcuboot_primary_app:
  address: 0xc200
  end_address: 0x75000
  region: flash_primary
  size: 0x68e00
  span:
  - app
  - spm
mcuboot_scratch:
  address: 0xde000
  end_address: 0xfc000
  placement:
    after:
    - app
    align:
      start: 0x1000
  region: flash_primary
  size: 0x1e000
mcuboot_secondary:
  address: 0x75000
  end_address: 0xde000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0x69000
nrf_modem_lib_ctrl:
  address: 0x20010000
  end_address: 0x200104e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - spm_sram
    - start
  region: sram_primary
  size: 0x4e8
nrf_modem_lib_rx:
  address: 0x200124e8
  end_address: 0x200144e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - nrf_modem_lib_tx
  region: sram_primary
  size: 0x2000
nrf_modem_lib_sram:
  address: 0x20010000
  end_address: 0x200144e8
  orig_span: &amp;amp;id001
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x44e8
  span: *id001
nrf_modem_lib_tx:
  address: 0x200104e8
  end_address: 0x200124e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - nrf_modem_lib_ctrl
  region: sram_primary
  size: 0x2000
otp:
  address: 0xff8108
  end_address: 0xff83fc
  region: otp
  size: 0x2f4
settings_storage:
  address: 0xfe000
  end_address: 0x100000
  placement:
    after:
    - mcuboot_scratch
  region: flash_primary
  size: 0x2000
spm:
  address: 0xc200
  end_address: 0x18200
  inside:
  - mcuboot_primary_app
  placement:
    before:
    - app
  region: flash_primary
  size: 0xc000
spm_sram:
  address: 0x20000000
  end_address: 0x20010000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0x10000
sram_nonsecure:
  address: 0x20010000
  end_address: 0x20040000
  orig_span: &amp;amp;id002
  - sram_primary
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x30000
  span: *id002
sram_primary:
  address: 0x200144e8
  end_address: 0x20040000
  region: sram_primary
  size: 0x2bb18
sram_secure:
  address: 0x20000000
  end_address: 0x20010000
  orig_span: &amp;amp;id003
  - spm_sram
  region: sram_primary
  size: 0x10000
  span: *id003
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if you need more files. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353450?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 17:43:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:770238b7-2c61-495e-b3c8-0c66364d6887</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;Im getting now this error:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;00&amp;gt; *** Booting Zephyr OS build v2.7.0-ncs1 ***&lt;br /&gt;00&amp;gt; I: Starting bootloader&lt;br /&gt;00&amp;gt; I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;00&amp;gt; I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;00&amp;gt; I: Boot source: none&lt;br /&gt;00&amp;gt; I: Swap type: none&lt;br /&gt;00&amp;gt; I: Bootloader chainload address offset: 0xc000&lt;br /&gt;00&amp;gt; I: Jumping to the first image slot&lt;br /&gt;00&amp;gt; E: Protect mcuboot flash failed, cancel startup.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And here is the content of the pm_static.yml file:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app: {address: 0x18200, size: 0x5ae00}
mcuboot:
  address: 0x0
  placement:
    before: [mcuboot_primary]
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  placement:
    align: {start: 0x1000}
    before: [mcuboot_primary_app]
  size: 0x200
mcuboot_primary:
  address: 0xc000
  size: 0x69000
  span: [spm, mcuboot_pad, app]
mcuboot_primary_app:
  address: 0xc200
  size: 0x68e00
  span: [app, spm]
mcuboot_scratch:
  address: 0xde000
  placement:
    after: [app]
    align: {start: 0x1000}
  size: 0x1e000
mcuboot_secondary:
  address: 0x75000
  placement:
    after: [mcuboot_primary]
    align: {start: 0x1000}
  share_size: [mcuboot_primary]
  size: 0x69000
EMPTY_0:
  address: 0xfc000
  size: 0x2000
settings_storage:
  address: 0xfe000
  placement:
    after: [mcuboot_scratch]
  size: 0x2000
spm:
  address: 0xc200
  inside: [mcuboot_primary_app]
  placement:
    before: [app]
  size: 0xc000
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And for &amp;quot;board_partition_conf.dts&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;slot0_partition {
    reg = &amp;lt;0x00010000 0x30000&amp;gt;;
};

&amp;amp;slot0_ns_partition {
    reg = &amp;lt;0x00040000 0x40000&amp;gt;;
};

&amp;amp;slot1_partition {
    reg = &amp;lt;0x00080000 0x30000&amp;gt;;
};

&amp;amp;slot1_ns_partition {
    reg = &amp;lt;0x000b0000 0x40000&amp;gt;;
};

/* Default SRAM planning when building for nRF9160 with
 * ARM TrustZone-M support
 * - Lowest 64 kB SRAM allocated to Secure image (sram0).
 * - 64 kB SRAM reserved for and used by the BSD socket
 *   library.
 * - Upper 128 kB allocated to Non-Secure image (sram0_ns).
 */

&amp;amp;sram0_s {
    reg = &amp;lt;0x20000000 DT_SIZE_K(64)&amp;gt;;
};

&amp;amp;sram0_bsd {
    reg = &amp;lt;0x20010000 DT_SIZE_K(64)&amp;gt;;
};

&amp;amp;sram0_ns {
    reg = &amp;lt;0x20020000 DT_SIZE_K(128)&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353423?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 15:06:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01eb4bc8-fe7f-4d13-9975-8790c370daae</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Let me know if you run into any issues, or have questions!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353400?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 14:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93cc6e1d-1958-40e7-bce2-3cd51fd66671</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;Thank you for pointing that one. After looking at those files you requested, looks like I need to re-implement the board files since I had it initially implemented using NCS v1.5.0.&lt;/p&gt;
&lt;p&gt;I will get back to you regardless if it fixed the issue or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353276?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 08:51:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e8ab5cd-eec9-45fb-a547-c5e87c228cd2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Given that it downloads, resets and prints this:&lt;/p&gt;
[quote user=""]00&amp;gt; I: Swap type: test[/quote]
&lt;p&gt;It means that mcuboot recognizes this image, but on the very next sequence:&lt;/p&gt;
[quote user=""]00&amp;gt; I: Jumping to the first image slot&lt;br /&gt;00&amp;gt; *** Booting Zephyr OS build v2.7.0-ncs1 ***&lt;br /&gt;00&amp;gt; I: Starting bootloader&lt;br /&gt;00&amp;gt; I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x3&lt;br /&gt;00&amp;gt; I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;00&amp;gt; I: Boot source: none&lt;br /&gt;00&amp;gt; I: Swap type: revert[/quote]
&lt;p&gt;You are essentially trying to boot the new image, and you&amp;#39;re reset again, where it reverts to the original image.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This can happen if the configuration differs from&amp;nbsp;what mcuboot expects, for instance in the flash layout of the secondary/primary slot.&lt;/p&gt;
&lt;p&gt;Could you share details on your original projects &amp;quot;partitions.yml&amp;quot; and/or &amp;quot;pm_static.yml&amp;quot;, as well as the &amp;quot;update project&amp;quot;&amp;#39;s partition layout?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is very important that you follow the partition layout of the original image for all update images.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial LTE Modem Application (NRF9160) FOTA does not apply new update</title><link>https://devzone.nordicsemi.com/thread/353196?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 19:06:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa43f71c-52ea-4db3-8334-724d3cb24d02</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;This is using NCS SDK v1.8.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>