<?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>nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2</link><description>Hi, 
 I am using nRf9160dk with mcuboot secondary image on external flash base on AZURE_FOTA example, ncs 2.0.2. 
 Found the bootloader cannot runs primary image. 
 So, I need advice on how to set up the mcuboot secondary with SPI flash. 
 
 
 Checked</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Dec 2022 09:13:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2" /><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/400320?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2022 09:13:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d87655df-8732-43e6-917f-4e6dec714227</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="Rung"]Thanks for your notification of this, I can use pm_static.yml and do the FOTA (ncs 2.1.2) without an error by delete the build and regenerate the project.[/quote]
&lt;p&gt;This is great to hear!&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/400015?ContentTypeID=1</link><pubDate>Sat, 10 Dec 2022 16:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d2296d6-d56b-46fc-a0ca-b2f2c85621b0</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have already implemented every update suggested on the project.&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2/399838"]Note that you should delete the build and regenerate the project.[/quote]
&lt;p&gt;Thanks for your notification of this, I can use pm_static.yml and do the FOTA (ncs 2.1.2) without an error by delete the build and regenerate the project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/399838?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2022 08:28:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fcce14f-d901-42ae-9468-1183ccff8a4e</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="Rung"]&lt;p&gt;What is the &amp;quot;original static partition is kept for all-images as well&amp;quot; means?&lt;/p&gt;
&lt;p&gt;Did you mean we cannot costume the external flash partition by using the static partition, pm_static.yml file.&lt;/p&gt;
&lt;p&gt;If so, could you provide me some advise on how to partition the external flash?&lt;/p&gt;[/quote]
&lt;p&gt;In order to successfully update, your &amp;quot;app_update.bin&amp;quot; must be provided with the same pm_static.yml as your original project.&lt;/p&gt;
&lt;p&gt;This is to ensure that the image is setup with the same flash address offset as mcuboot was configured to.&lt;/p&gt;
&lt;p&gt;Did you add this to your configuration?&amp;nbsp;&lt;/p&gt;
[quote user="hkn"]CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y[/quote]
&lt;p&gt;And also changed this line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    DEVICE &amp;quot;DT_CHOSEN(nordic_pm_ext_flash)&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.1.2/cmake/partition_manager.cmake#L215"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.1.2/cmake/partition_manager.cmake#L215&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that you should delete the build and regenerate the project.&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/399830?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2022 07:51:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6e0f9dd-062f-417e-9d15-606c8876343b</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2/399327"]Which image are you downloading?[/quote]
&lt;p&gt;Like with the &amp;quot;azure_fota&amp;quot; sample I tested, I used the &amp;quot;app_update.bin&amp;quot; file.&lt;/p&gt;
&lt;p&gt;However, the &amp;quot;Cannot upgrade: not a compatible amount of sectors&amp;quot; error, I have divided the external flash memory by add the &amp;quot;pm_static.yml&amp;quot; file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2/399327"]When updating, it is important that the original static partition is kept for all update-images as well, to ensure that mcuboot recognizes the image properly.[/quote]
&lt;p&gt;What is the &amp;quot;original static partition is kept for all-images as well&amp;quot; means?&lt;/p&gt;
&lt;p&gt;Did you mean we cannot costume the external flash partition by using the static partition, pm_static.yml file.&lt;/p&gt;
&lt;p&gt;If so, could you provide me some advise on how to partition the external flash?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/399327?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 07:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41e21832-c61b-410f-98df-2cca90a22c7f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Rung"]I works properly with the example.[/quote]
&lt;p&gt;Ok, good, so that means that you have implemented the formerly mentioned fix for ncs v2.1.0.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which image are you downloading?&lt;/p&gt;
&lt;p&gt;When updating, it is important that the original static partition is kept for all update-images as well, to ensure that mcuboot recognizes the image properly.&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/399044?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 18:22:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:028f8f37-229c-4fc9-b590-baff5045aece</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/hkn"&gt;H&amp;aring;kon Alseth&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Thanks for your support and sorry for my late reply.&lt;/p&gt;
&lt;p&gt;I works properly with the example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By the way,&amp;nbsp;my external flash needs to be portioned.&lt;/p&gt;
&lt;p&gt;I created a static partition for the external flash using the &amp;quot;pm static.yml&amp;quot; file.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;autoconf.h&amp;gt;
EMPTY_0:
  address: 0xc000
  end_address: 0x10000
  placement:
    before:
    - mcuboot_pad
  region: flash_primary
  size: 0x4000
EMPTY_1:
  address: 0xf0000
  end_address: 0xf8000
  placement:
    after:
    - mcuboot_secondary
  region: flash_primary
  size: 0x8000
app:
  address: 0x1c200
  end_address: 0x80000
  region: flash_primary
  size: 0x63e00
littlefs_storage:
  address: 0xfa000
  align:
    start: 0x8000
  end_address: 0xfb000
  inside:
  - nonsecure_storage
  placement:
    before:
    - end
  region: flash_primary
  size: 0x1000
nvs_storage:
  address: 0xfb000
  align:
    start: 0xb000
  end_address: 0xfc000
  inside:
  - nonsecure_storage
  placement:
    before:
    - end
  region: flash_primary
  size: 0x1000
reserved_storage:
  address: 0xfc000
  align:
    start: 0x8000
  end_address: 0x10000
  inside:
  - nonsecure_storage
  placement:
    before:
    - end
  region: flash_primary
  size: 0x4000    
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0x10000
  end_address: 0x10200
  placement:
    align:
      start: 0x8000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0x10000
  end_address: 0x80000
  orig_span: &amp;amp;id001
  - tfm
  - mcuboot_pad
  - app
  region: flash_primary
  sharers: 0x1
  size: 0x70000
  span: *id001
mcuboot_primary_app:
  address: 0x10200
  end_address: 0x80000
  orig_span: &amp;amp;id002
  - app
  - tfm
  region: flash_primary
  size: 0x6fe00
  span: *id002
# mcuboot_secondary:
#   address: 0x80000
#   end_address: 0xf0000
#   placement:
#     after:
#     - mcuboot_primary
#     align:
#       start: 0x8000
#   region: flash_primary
#   share_size:
#   - mcuboot_primary
#   size: 0x70000
nonsecure_storage:
  address: 0xf8000
  end_address: 0x100000
  orig_span: &amp;amp;id003
  - settings_storage
  region: flash_primary
  size: 0x8000
  span: *id003
nrf_modem_lib_ctrl:
  address: 0x2000b000
  end_address: 0x2000b4e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - tfm_sram
    - start
  region: sram_primary
  size: 0x4e8
nrf_modem_lib_rx:
  address: 0x2000d4e8
  end_address: 0x2000f4e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - nrf_modem_lib_tx
  region: sram_primary
  size: 0x2000
nrf_modem_lib_sram:
  address: 0x2000b000
  end_address: 0x2000f4e8
  orig_span: &amp;amp;id004
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x44e8
  span: *id004
nrf_modem_lib_tx:
  address: 0x2000b4e8
  end_address: 0x2000b4e8
  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: 0xf8000
  end_address: 0xfa000
  inside:
  - nonsecure_storage
  placement:
    align:
      start: 0x8000
    before:
    - end
  region: flash_primary
  size: 0x2000
sram_nonsecure:
  address: 0x2000b000
  end_address: 0x20040000
  orig_span: &amp;amp;id005
  - sram_primary
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x35000
  span: *id005
sram_primary:
  address: 0x2000f4e8
  end_address: 0x20040000
  region: sram_primary
  size: 0x30b18
sram_secure:
  address: 0x20000000
  end_address: 0x200B0000
  orig_span: &amp;amp;id006
  - tfm_sram
  region: sram_primary
  size: 0x0B000
  span: *id006
tfm:
  address: 0x10200
  end_address: 0x1c200
  inside:
  - mcuboot_primary_app
  placement:
    before:
    - app
  region: flash_primary
  size: 0xc000
tfm_nonsecure:
  address: 0x1c200
  end_address: 0x80000
  orig_span: &amp;amp;id007
  - app
  region: flash_primary
  size: 0x63e00
  span: *id007
tfm_secure:
  address: 0x10000
  end_address: 0x1c200
  orig_span: &amp;amp;id008
  - mcuboot_pad
  - tfm
  region: flash_primary
  size: 0xc200
  span: *id008
tfm_sram:
  address: 0x20000000
  end_address: 0x2000B000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0x0B000
external_flash:
  address: 0x0
  device: MX25R64
  end_address: 0x800000
  region: external_flash
  size: 0x800000
mcuboot_secondary:
  address: 0x00
  region: external_flash
  size: 0xF0000
lte_modem_fw:
  address: 0xF0000
  region: external_flash
  size: 0x4F000
abc_fw:
  address: 0x13F000
  region: external_flash
  size: 0xF5000 
def_fw:
  address: 0x234000
  region: external_flash
  size: 0xF5000   
datalogger_storage:
  address: 0x329000
  region: external_flash
  size: 0x450000&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The system can download successfully, however after rebooting to the bootloader, it displays that it cannot upgrade.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:07:47.032,867] &amp;lt;inf&amp;gt; download_client: Downloaded 209000/214490 bytes (97%)
[00:07:48.711,853] &amp;lt;inf&amp;gt; download_client: Downloaded 210000/214490 bytes (97%)
[00:07:50.662,628] &amp;lt;inf&amp;gt; download_client: Downloaded 211000/214490 bytes (98%)
[00:07:52.616,790] &amp;lt;inf&amp;gt; download_client: Downloaded 212000/214490 bytes (98%)
[00:07:54.151,000] &amp;lt;inf&amp;gt; download_client: Downloaded 213000/214490 bytes (99%)
[00:07:55.528,106] &amp;lt;inf&amp;gt; download_client: Downloaded 214000/214490 bytes (99%)
[00:07:57.320,892] &amp;lt;inf&amp;gt; download_client: Downloaded 214490/214490 bytes (100%)
[00:07:57.338,562] &amp;lt;inf&amp;gt; download_client: Download complete
[00:07:57.444,396] &amp;lt;inf&amp;gt; dfu_target_mcuboot: MCUBoot image-0 upgrade scheduled. Reset device to apply
AZURE_IOT_HUB_EVT_FOTA_DONE
The device will reboot in 5 seconds to apply update
AZURE_IOT_HUB_EVT_TWIN_RESULT_SUCCESS, ID: 477&amp;amp;$version=23ersion=9
*** Booting Zephyr OS build v3.1.99-ncs1-1  ***
I: Starting bootloader
W: Cannot upgrade: not a compatible amount of sectors
I: Bootloader chainload address offset: 0x10000
*** Booting Zephyr OS build v3.1.99-ncs1-1  ***
Azure FOTA sample started
This may take a while if a modem firmware update is pending
[00:00:00.497,985] &amp;lt;inf&amp;gt; azure_fota: Current firmware version: v0.0.1Ext
Connecting to LTE network
DNS correctly set
+CEREG: 2,&amp;quot;C008&amp;quot;,&amp;quot;024BB1A1&amp;quot;,9
LTE cell changed: Cell ID: 38515105, Tracking area: 49160
+CSCON: 1
RRC mode: Connected
+CEREG: 1,&amp;quot;C008&amp;quot;,&amp;quot;024BB1A1&amp;quot;,9,,,&amp;quot;11100000&amp;quot;,&amp;quot;00010010&amp;quot;
Network registration status: Connected - home network
AZUREPSM parameter update: TAU: 10800, Active time: -1
_IOT_HUB_EVT_CONNECTING
AZURE_IOT_HUB_EVT_CONNECTED
AZURE_IOT_HUB_EVT_READY
[00:00:15.965,881] &amp;lt;wrn&amp;gt; azure_fota: FOTA image was not applied, rolled back
[00:00:15.976,013] &amp;lt;wrn&amp;gt; azure_fota: Update job (ID: 3) was already attempted, aborting
AZURE_IOT_HUB_EVT_TWIN_RECEIVED
AZURE_IOT_HUB_EVT_TWIN_RESULT_SUCCESS, ID: 159&amp;amp;$version=24
+CSCON: 0
RRC mode: Idle&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can we do the FOTA utilizing the external flash static partition?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/395078?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2022 10:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:062b086a-4329-4968-badd-5d63f8796713</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Marshall,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad to hear that it is working at your end now.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll pursue this issue internally, and make sure it is handled.&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/394801?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 19:41:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61f651bf-612f-4664-8918-cae4edc32e28</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;Oh my goodness..... IT WORKS&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks so much for the support.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Marshall&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/394765?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 15:29:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87676a68-94e0-4b87-8714-c8c5ae3d0f22</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/marshall"&gt;Marshall&lt;/a&gt;&amp;nbsp;and &lt;a href="https://devzone.nordicsemi.com/members/rung"&gt;Rung&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My deepest apologies for the inconvenience.&lt;/p&gt;
&lt;p&gt;Unfortunately, there is another breaking change in NCS v2.1.0, that blocks for using SPI based flash (&amp;quot;spi_nor&amp;quot;) in mcuboot.&lt;/p&gt;
&lt;p&gt;You will need in total 2 changes:&lt;/p&gt;
&lt;p&gt;1. in your child_image/mcuboot.conf, you will need to add this symbol when using SPI and flash:&lt;/p&gt;
&lt;p&gt;CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. In addition, there is a bug with the flash_device that mcuboot picks up through the &amp;quot;partition manager&amp;quot; script system.&lt;/p&gt;
&lt;p&gt;This line in ncs_v2.1.0/nrf/cmake/partition_manager.cmake:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.1.2/cmake/partition_manager.cmake#L215"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.1.2/cmake/partition_manager.cmake#L215&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Shall be changed to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    DEVICE &amp;quot;DT_CHOSEN(nordic_pm_ext_flash)&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The second point is handled in this PR, but due to release-note changes as well, it is not easy to cherry pick directly:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/9169"&gt;https://github.com/nrfconnect/sdk-nrf/pull/9169&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try these two steps and report back if this helps the scenario?&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/394319?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 08:06:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ff52ff0-0c4c-4825-8e9a-285586544ff5</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/hkn"&gt;Håkon Alseth&lt;/a&gt;&amp;nbsp;I&amp;#39;m having a similar problem, for the last couple of weeks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NCS 2.1.0&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the HTTP application update, and it works OK when using FOTA and internal flash however it doesn&amp;#39;t work when using external flash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I get an error&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Failed reading sectors; BOOT_MAX_IMG_SECTORS=256 - too small?&lt;br /&gt;Cannot upgrade: not a compatible amount of sectors&lt;/p&gt;
&lt;p&gt;[00:00:00.*** Booting Zephyr OS build v3.1.99-ncs1 ***&lt;br /&gt;HTTP application update sample started&lt;br /&gt;Using version 1&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.368,041] &amp;lt;dbg&amp;gt; os: k_sched_unlock: scheduler unlocked (0x2000cce0:0)
[00:00:05.556,610] &amp;lt;inf&amp;gt; mcuboot: Starting bootloader
[00:00:05.556,640] &amp;lt;dbg&amp;gt; os: setup_thread_stack: stack 0x2000ebb8 for thread 0x2000c708: obj_size=768 buf_start=0x2000c97d  buf_size 768 stack_ptr=0x2000c97f
[00:00:05.556,915] &amp;lt;wrn&amp;gt; mcuboot: Failed reading sectors; BOOT_MAX_IMG_SECTORS=256 - too small?
[00:00:05.556,945] &amp;lt;wrn&amp;gt; mcuboot: Cannot upgrade: not a compatible amount of sectors
[00:00:00.*** Booting Zephyr OS build v3.1.99-ncs1  ***
HTTP application update sample started
Using version 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;west build -t partition_manager_report&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  external_flash (0x400000 - 4096kB):
+---------------------------------------------+
| 0x0: mcuboot_secondary (0xf0000 - 960kB)    |
| 0xf0000: external_flash (0x310000 - 3136kB) |
+---------------------------------------------+

  flash_primary (0x100000 - 1024kB):
+--------------------------------------------------+
| 0x0: mcuboot (0x10000 - 64kB)                    |
+---0x10000: mcuboot_primary (0xf0000 - 960kB)-----+
+---0x10000: tfm_secure (0xc200 - 48kB)------------+
| 0x10000: mcuboot_pad (0x200 - 512B)              |
+---0x10200: mcuboot_primary_app (0xefe00 - 959kB)-+
| 0x10200: tfm (0xc000 - 48kB)                     |
+---0x1c200: tfm_nonsecure (0xe3e00 - 911kB)-------+
| 0x1c200: app (0xe3e00 - 911kB)                   |
+--------------------------------------------------+

  otp (0x2f4 - 756B):
+------------------------------+
| 0xff8108: otp (0x2f4 - 756B) |
+------------------------------+

  sram_primary (0x40000 - 256kB):
+--------------------------------------------------+
+---0x20000000: sram_secure (0x8000 - 32kB)--------+
| 0x20000000: tfm_sram (0x8000 - 32kB)             |
+---0x20008000: sram_nonsecure (0x38000 - 224kB)---+
+---0x20008000: nrf_modem_lib_sram (0x44e8 - 17kB)-+
| 0x20008000: nrf_modem_lib_ctrl (0x4e8 - 1kB)     |
| 0x200084e8: nrf_modem_lib_tx (0x2000 - 8kB)      |
| 0x2000a4e8: nrf_modem_lib_rx (0x2000 - 8kB)      |
+--------------------------------------------------+
| 0x2000c4e8: sram_primary (0x33b18 - 206kB)       |
+--------------------------------------------------+&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
# General config
CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_REBOOT=y
CONFIG_NEWLIB_LIBC=y

# Network
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_NATIVE=n

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n

# Modem library
CONFIG_NRF_MODEM_LIB=y
CONFIG_NRF_MODEM_LIB_SYS_INIT=n

# Shell configurations
CONFIG_SHELL=y
CONFIG_SHELL_WILDCARD=n
CONFIG_SHELL_CMD_BUFF_SIZE=128

# Library for buttons and LEDs
CONFIG_DK_LIBRARY=y

# Heap and stacks
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=8192

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# GPIO
CONFIG_GPIO=y

# FOTA library
CONFIG_FOTA_DOWNLOAD=y

# Download client
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096

# DFU Target
CONFIG_DFU_TARGET=y

# Modem key management
CONFIG_MODEM_KEY_MGMT=y

# Application Upgrade support
CONFIG_BOOTLOADER_MCUBOOT=y

# Sample configuration
CONFIG_DOWNLOAD_HOST=&amp;quot;nrfconnectsdk.s3.eu-central-1.amazonaws.com&amp;quot;

CONFIG_DOWNLOAD_FILE_V2=&amp;quot;app_update.bin&amp;quot;
CONFIG_DOWNLOAD_FILE_V1=&amp;quot;app_downgrade.bin&amp;quot;
CONFIG_APPLICATION_VERSION=1



CONFIG_NRFX_SPIM3=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_NORDIC_QSPI_NOR=n




CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_STREAM_FLASH=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y


CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32

CONFIG_LOG=y
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_LOG_BACKEND_UART=y
CONFIG_STREAM_FLASH_LOG_LEVEL_DBG=y
CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE=2048
CONFIG_IMG_MANAGER_LOG_LEVEL_DBG=y
#turn off compiler optimisations so we can debug it
#CONFIG_NO_OPTIMIZATIONS=y

CONFIG_BUILD_WITH_TFM=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;circuitdojo_feather_nrf9160_ns.overlay&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.

// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:

// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels

// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://nrfconnect.github.io/vscode-nrf-connect/devicetree/nrfdevicetree.html

/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;is25lp032d;
	};

	aliases {
		spi-flash0 = &amp;amp;is25lp032d;
        led0 = &amp;amp;blue_led;
        led1 = &amp;amp;blue_led;
    
    };

    leds {
        compatible = &amp;quot;gpio-leds&amp;quot;;
        blue_led: led_0 {
            gpios = &amp;lt;&amp;amp;gpio0 3 GPIO_ACTIVE_LOW&amp;gt;;
            label = &amp;quot;Blue LED (D7)&amp;quot;;
        };
    };

};

&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
};


&amp;amp;spi3 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;


	/delete-node/ w25q32jv@0;


	cs-gpios = &amp;lt; &amp;amp;gpio0 7 GPIO_ACTIVE_LOW &amp;gt;;
	is25lp032d: is25lp032d@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		label = &amp;quot;IS25LP032D&amp;quot;;
		reg = &amp;lt; 0 &amp;gt;;
		spi-max-frequency = &amp;lt; 40000000 &amp;gt;;
		wp-gpios = &amp;lt; &amp;amp;gpio0 8 GPIO_ACTIVE_LOW &amp;gt;;
		hold-gpios = &amp;lt; &amp;amp;gpio0 10 GPIO_ACTIVE_LOW &amp;gt;;
		size = &amp;lt; 0x2000000 &amp;gt;;
		has-dpd;
		t-enter-dpd = &amp;lt; 3000 &amp;gt;;
		t-exit-dpd = &amp;lt; 30000 &amp;gt;;
		jedec-id = [ 9d 60 16  ];

	};
    
};




&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;child_image/mcuboot.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NORDIC_QSPI_NOR=n
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_NRFX_SPIM3=y

CONFIG_MULTITHREADING=y

# MCUboot requires a large stack size, otherwise an MPU fault will occur
CONFIG_MAIN_STACK_SIZE=10240



# Enable flash operations
CONFIG_FLASH=y


# This must be increased to accommodate the bigger images.
CONFIG_BOOT_MAX_IMG_SECTORS=256

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000


# Size of mcuboot partition
CONFIG_SIZE_OPTIMIZATIONS=y

CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

CONFIG_MCUBOOT_SERIAL=n #make sure this is set to n if you want to log stuff.

CONFIG_LOG_MODE_MINIMAL=n
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_LOG_MODE_DEFERRED=y

CONFIG_LOG_OVERRIDE_LEVEL=4
CONFIG_LOG_BACKEND_UART=y
CONFIG_UART_CONSOLE=y
CONFIG_CONSOLE=y
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32
#CONFIG_MCUBOOT_OVERWRITE_ONLY=y

#turn off compiler optimisations so we can debug it
#CONFIG_NO_OPTIMIZATIONS=y

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;child_image/mcuboot/boards/circuitdojo_feather_nrf9160.overlay&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2021 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */
 //MKB added this entire file in the child image directory to try and enable external flash as
 //the second slot, so that we can get more primary flash for a larger application.
 //https://devzone.nordicsemi.com/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2

 //note that the file name is thingy91_nrf9160.overlay (no &amp;quot;ns&amp;quot; in the file name) as mcuboot runs secure.

 / {
	chosen {
		nordic,pm-ext-flash = &amp;amp;is25lp032d;
		
	};

	aliases {
		spi-flash0 = &amp;amp;is25lp032d;
    };


};

&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
};



&amp;amp;spi3 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;


	/delete-node/ w25q32jv@0;

	cs-gpios = &amp;lt; &amp;amp;gpio0 7 GPIO_ACTIVE_LOW &amp;gt;;
	is25lp032d: is25lp032d@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		label = &amp;quot;IS25LP032D&amp;quot;;
		reg = &amp;lt; 0 &amp;gt;;
		spi-max-frequency = &amp;lt; 40000000 &amp;gt;;
		wp-gpios = &amp;lt; &amp;amp;gpio0 8 GPIO_ACTIVE_LOW &amp;gt;;
		hold-gpios = &amp;lt; &amp;amp;gpio0 10 GPIO_ACTIVE_LOW &amp;gt;;
		size = &amp;lt; 0x2000000 &amp;gt;;
		has-dpd;
		t-enter-dpd = &amp;lt; 3000 &amp;gt;;
		t-exit-dpd = &amp;lt; 30000 &amp;gt;;
		jedec-id = [ 9d 60 16  ];

	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the image is loading into external flash&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uart:~$ mcuboot
swap type: test
confirmed: 0

primary area (3):
  version: 0.0.0+0
  image size: 192552
  magic: unset
  swap type: none
  copy done: unset
  image ok: unset

secondary area (1):
  version: 0.0.0+0
  image size: 192432
  magic: good
  swap type: test
  copy done: unset
  image ok: unset
uart:~$ [00:00:35.131,164] &amp;lt;inf&amp;gt; mcuboot_util: Swap type: test
[00:00:35.131,164] &amp;lt;inf&amp;gt; mcuboot_util: Swap type: test&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;shell read of flash - not sure if this is a valid result, but it looks promising.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uart:~$ flash read IS25LP032D 0 0x1000
00000000: 3d b8 f3 96 00 00 00 00  00 02 00 00 b0 ef 02 00 |=....... ........|
00000010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |........ ........|
00000020: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000030: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000040: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000050: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000060: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000070: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000080: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000090: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000000A0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000000B0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000000C0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000000D0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000000E0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000000F0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000100: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000110: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000120: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000130: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000140: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000150: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000160: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000170: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000180: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000190: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000001A0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000001B0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000001C0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000001D0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000001E0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
000001F0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
00000200: 00 0c 00 20 45 03 01 00  c7 03 01 00 61 12 01 00 |... E... ....a...|
00000210: 6b 12 01 00 75 12 01 00  89 12 01 00 7f 12 01 00 |k...u... ........|
00000220: 00 00 00 00 00 00 00 00  00 00 00 00 95 20 01 00 |........ ..... ..|
00000230: e3 03 01 00 00 00 00 00  59 20 01 00 eb 03 01 00 |........ Y ......|
00000240: 00 00 00 00 00 00 00 00  00 00 00 00 ef 03 01 00 |........ ........|
00000250: 00 00 00 00 f3 03 01 00  00 00 00 00 00 00 00 00 |........ ........|
00000260: f7 03 01 00 fb 03 01 00  ff 03 01 00 03 04 01 00 |........ ........|
00000270: 00 00 00 00 07 04 01 00  0b 04 01 00 0f 04 01 00 |........ ........|
00000280: 13 04 01 00 17 04 01 00  00 00 00 00 00 00 00 00 |........ ........|
00000290: 1b 04 01 00 1f 04 01 00  00 00 00 00 00 00 00 00 |........ ........|
000002A0: 23 04 01 00 00 00 00 00  00 00 00 00 27 04 01 00 |#....... ....&amp;#39;...|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;d really appreciate a bit of help its driving me nuts.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is me as well.....&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/93387/fota-to-external-flash"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/93387/fota-to-external-flash&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Marshall&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/392060?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 08:51:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75e307dd-a333-4942-8681-510a83ae5333</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;Yes, this issue was resolved with this PR:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/8363"&gt;https://github.com/nrfconnect/sdk-nrf/pull/8363&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is present in ncs v2.1.0.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Rung"]If so, could you describe how to use it?[/quote]
&lt;p&gt;Based on your previously used project, you take away the SPM config:&lt;/p&gt;
&lt;p&gt;CONFIG_BUILD_WITH_TFM=y&lt;br /&gt;# CONFIG_SPM=n&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this and see if this works as expected?&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/392037?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 07:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:671542b9-967a-4dd8-b9f3-eb7a6ebf6bc1</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/hkn"&gt;Håkon Alseth&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I want to know if the TFM issue has been resolved.&lt;/p&gt;
&lt;p&gt;If so, could you describe how to use it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/383443?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2022 10:46:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c403c1e1-640a-48b2-985f-5352a49b8fbd</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="Rung"]&lt;p&gt;By the way, I already confirm the device id [c2 28 17] is can use or not.&lt;/p&gt;
&lt;p&gt;I have been tested with the&amp;nbsp;spi_flash example, it can read/write in normally with the device id [c2 28 17].&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then change the device to [00 00 00] in overlay file.&lt;/p&gt;[/quote]
&lt;p&gt;This is the jedec id for your external flash, which can be read out from the datasheet of your used external flash.&lt;/p&gt;
&lt;p&gt;For the MX25R64 mounted on the nRF9160-DK, it is c2 28 17, and if you read all zeros, then it has issues connecting to your flash.&lt;/p&gt;
&lt;p&gt;For the nRF9160-DK, you must switch in the pins for communicating with the flash, as explained in this post:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/90296/full-modem-update-configuration/378775"&gt;RE: Full modem update configuration&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that this is for the board controller, ie. nrf9160dk_nrf52840, so it is important that you set the switch into &amp;quot;NRF52&amp;quot; position before programming the above snippet.&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/383428?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2022 09:38:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acbf38d2-329d-4795-86d5-7ee1ad564b38</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2/383288"]&lt;p&gt;Try commenting out this line in child_image/mcuboot.conf:&lt;/p&gt;
&lt;p&gt;CONFIG_DEBUG_OPTIMIZATIONS=y&lt;/p&gt;[/quote]
&lt;p&gt;Build can run without error, but I got a forever loop error after flash the firmware to the board.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.0.99-ncs1-1  ***
I: Starting bootloader
W: Failed reading sectors; BOOT_MAX_IMG_SECTORS=256 - too small?
E: ***** MPU FAULT *****
E:   Instruction Access Violation
E: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x2000c8e4
E: r3/a4:  0x00000020 r12/ip:  0xb0f7f9b5 r14/lr:  0x00000ddf
E:  xpsr:  0x69100000
E: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
E: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
E: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
E: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
E: fpscr:  0x0000960c
E: Faulting instruction address (r15/pc): 0xb0f7f9b4
E: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Current thread: 0x2000c7e8 (unknown)
E: Device id 00 00 00 does not match config c2 28 17
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Wandering the return data indicates that the device id does not match because [00 00 00].&lt;/p&gt;
&lt;p&gt;By the way, I already confirm the device id [c2 28 17] is can use or not.&lt;/p&gt;
&lt;p&gt;I have been tested with the&amp;nbsp;spi_flash example, it can read/write in normally with the device id [c2 28 17].&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then change the device to [00 00 00] in overlay file.&lt;/p&gt;
&lt;p&gt;Program runs as normally, can connect to the azure IoT hub and can start to do FOTA task.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.0.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=bad, swap_type=0x0, copy_done=0x2, image_ok=0x2
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0x10000
*** Booting Zephyr OS build v3.0.99-ncs1-1  ***
Flash regions           Domain          Permissions
00 03 0x00000 0x20000   Secure          rwxl
04 31 0x20000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 3 with size 32.

SRAM region             Domain          Permissions
00 03 0x00000 0x08000   Secure          rwxl
04 31 0x08000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Secure          SKIP
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU0             Non-Secure      OK
22 NRF_EGU1             Non-Secure      OK
23 NRF_EGU2             Non-Secure      OK
24 NRF_EGU3             Non-Secure      OK
25 NRF_EGU4             Non-Secure      OK
26 NRF_EGU5             Non-Secure      OK
27 NRF_DPPIC            Non-Secure      OK
28 NRF_REGULATORS       Non-Secure      OK
29 NRF_PDM              Non-Secure      OK
30 NRF_I2S              Non-Secure      OK
31 NRF_GPIOTE1          Non-Secure      OK

SPM: NS image at 0x20200
SPM: NS MSP at 0x20013130
SPM: NS reset vector at 0x265f9
SPM: prepare to jump to Non-Secure image.
*** Booting Zephyr OS build v3.0.99-ncs1-1  ***
Azure FOTA sample started
This may take a while if a modem firmware update is pending
[00:00:00.548,461] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Setting DPS registration ID: nordic_960074368
[00:00:00.558,319] &amp;lt;inf&amp;gt; azure_fota: Current firmware version: v0.0.1
Connecting to LTE network
DNS correctly set
+CEREG: 2,&amp;quot;C008&amp;quot;,&amp;quot;024A90A3&amp;quot;,9
LTE cell changed: Cell ID: 38441123, Tracking area: 49160
+CSCON: 1
RRC mode: Connected
+CEREG: 1,&amp;quot;C008&amp;quot;,&amp;quot;024A90A3&amp;quot;,9,,,&amp;quot;11100000&amp;quot;,&amp;quot;00010010&amp;quot;
Network registration status: Connected - home network
PSM parameter update: TAU: 10800, Active time: -1
AZURE_IOT_HUB_EVT_DPS_CONNECTING
AZURE_IOT_HUB_EVT_DPS_REGISTERING
[00:00:39.859,466] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Device ID nordic_960074368 is now registered to v3hub.azure-devices.net
AZURE_IOT_HUB_EVT_DPS_DONE
AZURE_IOT_HUB_EVT_CONNECTING
AZURE_IOT_HUB_EVT_CONNECTED
AZURE_IOT_HUB_EVT_READY
[00:01:05.090,484] &amp;lt;wrn&amp;gt; azure_fota: Update job (ID: 1) was already attempted, aborting
AZURE_IOT_HUB_EVT_TWIN_RECEIVED&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But after download complete the err is occur as below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:30:05.155,761] &amp;lt;inf&amp;gt; download_client: Downloaded 214000/221979 bytes (96%)
[00:30:09.566,833] &amp;lt;inf&amp;gt; download_client: Downloaded 215000/221979 bytes (96%)
[00:30:19.423,309] &amp;lt;inf&amp;gt; download_client: Downloaded 216000/221979 bytes (97%)
[00:30:25.094,177] &amp;lt;inf&amp;gt; download_client: Downloaded 217000/221979 bytes (97%)
[00:30:29.169,219] &amp;lt;inf&amp;gt; download_client: Downloaded 218000/221979 bytes (98%)
[00:30:33.812,316] &amp;lt;inf&amp;gt; download_client: Downloaded 219000/221979 bytes (98%)
[00:30:36.030,792] &amp;lt;inf&amp;gt; download_client: Downloaded 220000/221979 bytes (99%)
[00:30:40.307,739] &amp;lt;inf&amp;gt; download_client: Downloaded 221000/221979 bytes (99%)
[00:30:42.945,892] &amp;lt;inf&amp;gt; download_client: Downloaded 221979/221979 bytes (100%)
[00:30:42.956,359] &amp;lt;inf&amp;gt; download_client: Download complete
[00:30:42.994,049] &amp;lt;err&amp;gt; dfu_target_mcuboot: boot_request_upgrade for image-0 error -14
[00:30:43.003,540] &amp;lt;err&amp;gt; fota_download: dfu_target_done error: -14
[00:30:43.011,047] &amp;lt;err&amp;gt; azure_fota: FOTA download failed
[00:30:43.017,883] &amp;lt;err&amp;gt; azure_iot_hub: AZURE_FOTA_EVT_ERROR
Unknown Azure IoT Hub event type: 22
AZURE_IOT_HUB_EVT_TWIN_RESULT_SUCCESS, ID: 1843024&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please assist me in solving this issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Again, my propose is update firmware via FOTA using external flash with the ncs 2.0.2 or newer version.&lt;/p&gt;
&lt;p&gt;Since the TF-M is still trying to solve the problem, I agree to work with the SPM.&lt;/p&gt;
&lt;p&gt;By the way, please let me know if there are any TF-M updates.&lt;/p&gt;
&lt;p&gt;Appreciate your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/383288?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2022 12:56:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db376d9d-960b-4c1b-8578-e7e21e19ea5d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;It looks like mcuboot is failing to compile due to a flash overflow (ie. too large image).&lt;/p&gt;
&lt;p&gt;Try commenting out this line in child_image/mcuboot.conf:&lt;/p&gt;
&lt;p&gt;CONFIG_DEBUG_OPTIMIZATIONS=y&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/383125?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 15:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de98b80d-cd5b-42fa-a27d-150b37ac4a7a</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I got a build error after applying your suggestion.&lt;/p&gt;
&lt;p&gt;Please advise.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[193/205] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work.c.obj
[194/205] Linking C static library zephyr\kernel\libkernel.a
[195/205] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
cmd.exe /C &amp;quot;cd . &amp;amp;&amp;amp; C:\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe   zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr\zephyr_pre0.elf  -Wl,-T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=C:/Users/TDCAdmin/Workspace/azure_fota_exFlash/build/mcuboot/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/libarch__arm__core__aarch32__cortex_m__cmse.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/boards/boards/arm/nrf9160dk_nrf9160/libboards__arm__nrf9160dk_nrf9160.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/spi/libdrivers__spi.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L&amp;quot;c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/thumb/v8-m.main+fp/hard&amp;quot;  -LC:/Users/TDCAdmin/Workspace/azure_fota_exFlash/build/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -no-pie  -mcpu=cortex-m33  -mthumb  -mabi=aapcs  -mfpu=fpv5-sp-d16  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  C:/ncs/v2.0.2/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc310_platform_0.9.14.a  C:/ncs/v2.0.2/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a &amp;amp;&amp;amp; cmd.exe /C &amp;quot;cd /D C:\Users\TDCAdmin\Workspace\azure_fota_exFlash\build\mcuboot\zephyr &amp;amp;&amp;amp; C:\ncs\toolchains\v2.0.2\opt\bin\cmake.exe -E echo &amp;quot;&amp;quot;
c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr\zephyr_pre0.elf section `rodata&amp;#39; will not fit in region `FLASH&amp;#39;
c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `FLASH&amp;#39; overflowed by 1108 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[15/287] No configure step for &amp;#39;spm_subimage&amp;#39;
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf 
cmd.exe /C &amp;quot;cd /D C:\Users\TDCAdmin\Workspace\azure_fota_exFlash\build\mcuboot &amp;amp;&amp;amp; C:\ncs\toolchains\v2.0.2\opt\bin\cmake.exe --build . --&amp;quot;
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: &amp;#39;c:\ncs\toolchains\v2.0.2\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\Users\TDCAdmin\Workspace\azure_fota_exFlash\build&amp;#39;

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/383112?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 14:17:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:426a93d1-2acb-4431-9993-e24ebdfc61fd</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;I reproduced the same issue, and it is related to the trusted firmware m (tfm) module. It currently has a bug in the handling of the mcuboot secondary slot, which we are addressing with this pull-request:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/8363"&gt;https://github.com/nrfconnect/sdk-nrf/pull/8363&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For now, I would recommend that you add this to your prj.conf to use SPM for the time being:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BUILD_WITH_TFM=n
CONFIG_SPM=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Could you test with this and see if this runs as expected?&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/382956?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 16:52:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e50dc455-e92a-4d36-a65a-028f6cb0190e</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;A1: Already delete build directory and flash again. The result is the same, mcuboot reboot forever loop.&lt;/p&gt;
&lt;p&gt;A2: build-folder/partitions.yml&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0xc000
  end_address: 0x10000
  placement:
    before:
    - mcuboot_pad
  region: flash_primary
  size: 0x4000
EMPTY_1:
  address: 0xfa000
  end_address: 0x100000
  placement:
    after:
    - settings_storage
  region: flash_primary
  size: 0x6000
app:
  address: 0x1c200
  end_address: 0xf8000
  region: flash_primary
  size: 0xdbe00
external_flash:
  address: 0xe8000
  end_address: 0x800000
  region: external_flash
  size: 0x718000
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0x10000
  end_address: 0x10200
  placement:
    align:
      start: 0x8000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0x10000
  end_address: 0xf8000
  orig_span: &amp;amp;id001
  - app
  - tfm
  - mcuboot_pad
  region: flash_primary
  size: 0xe8000
  span: *id001
mcuboot_primary_app:
  address: 0x10200
  end_address: 0xf8000
  orig_span: &amp;amp;id002
  - app
  - tfm
  region: flash_primary
  size: 0xe7e00
  span: *id002
mcuboot_secondary:
  address: 0x0
  device: MX25R64
  end_address: 0xe8000
  placement:
    align:
      start: 0x4
  region: external_flash
  share_size:
  - mcuboot_primary
  size: 0xe8000
nonsecure_storage:
  address: 0xf8000
  end_address: 0xfa000
  orig_span: &amp;amp;id003
  - settings_storage
  region: flash_primary
  size: 0x2000
  span: *id003
nrf_modem_lib_ctrl:
  address: 0x20010000
  end_address: 0x200104e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - tfm_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;id004
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x44e8
  span: *id004
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: 0xf8000
  end_address: 0xfa000
  inside:
  - nonsecure_storage
  placement:
    align:
      start: 0x8000
    before:
    - end
  region: flash_primary
  size: 0x2000
sram_nonsecure:
  address: 0x20010000
  end_address: 0x20040000
  orig_span: &amp;amp;id005
  - sram_primary
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x30000
  span: *id005
sram_primary:
  address: 0x200144e8
  end_address: 0x20040000
  region: sram_primary
  size: 0x2bb18
sram_secure:
  address: 0x20000000
  end_address: 0x20010000
  orig_span: &amp;amp;id006
  - tfm_sram
  region: sram_primary
  size: 0x10000
  span: *id006
tfm:
  address: 0x10200
  end_address: 0x1c200
  inside:
  - mcuboot_primary_app
  placement:
    before:
    - app
  region: flash_primary
  size: 0xc000
tfm_nonsecure:
  address: 0x1c200
  end_address: 0xf8000
  orig_span: &amp;amp;id007
  - app
  region: flash_primary
  size: 0xdbe00
  span: *id007
tfm_secure:
  address: 0x10000
  end_address: 0x1c200
  orig_span: &amp;amp;id008
  - mcuboot_pad
  - tfm
  region: flash_primary
  size: 0xc200
  span: *id008
tfm_sram:
  address: 0x20000000
  end_address: 0x20010000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0x10000
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/382869?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 09:59:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c803b9f3-89b9-4692-9637-356013b9aa90</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;Q1: Could you delete your build directory, then re-generate the project and flash again?&lt;/p&gt;
&lt;p&gt;This is to ensure a clean slate after changing/adding .overlay files.&lt;/p&gt;
&lt;p&gt;Q2: Can you share your build-folder/partitions.yml file?&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: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/382759?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 18:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96153932-8bc8-41e1-8019-b969ed23c41f</guid><dc:creator>Rung</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My code is struck in an infinite loop&amp;nbsp;when booting the mcuboot_primary slot.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.0.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0x10000
*** Booting Zephyr OS build v3.0.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0x10000
*** Booting Zephyr OS build v3.0.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0x10000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am taking your advice and doing:&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2/382671"]&lt;p&gt;I would recommend that you move this file to:&lt;/p&gt;
&lt;p&gt;child_image\mcuboot.conf&lt;/p&gt;[/quote]
&lt;p&gt;Rounding the mcuboot.conf as your recommend.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2/382671"]This should be child_image\mcuboot\boards\&lt;span style="text-decoration:underline;"&gt;nrf9160dk_nrf9160.overlay&lt;/span&gt;[/quote]
&lt;p&gt;This suggestion has also been implemented in my project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/91180/nrf9160dk-fota-using-external-flash-ncs-2-0-2/382671"]Since you&amp;#39;ve already setup the corresponding &amp;quot;nordic,pm-ext-flash&amp;quot; section in device-tree, you can remove (or move the pm_static.yml to a backed up location) and rely on the generated build\partitions.yml file instead.[/quote]
&lt;p&gt;Remove pm_static.yml since I have define &amp;quot;nordic.pm-ext-flash&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you provide me some advice and confirm my configuration from my initial post is the root cause of the issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160dk FOTA using external flash, ncs 2.0.2</title><link>https://devzone.nordicsemi.com/thread/382671?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 11:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcd703d8-afb9-49a2-8f88-51b0b8a3a50e</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=""]child_image\mcuboot\&lt;strong&gt;prj_mcuboot.conf&lt;/strong&gt;[/quote]
&lt;p&gt;You have two choices wrt. configuring a child_image:&lt;/p&gt;
&lt;p&gt;child_image/$image.conf&lt;/p&gt;
&lt;p&gt;This overrides the original default configuration for the child_image.&lt;/p&gt;
&lt;p&gt;Or:&lt;/p&gt;
&lt;p&gt;Replace the default configuration by setting:&lt;/p&gt;
&lt;p&gt;child_image/$image/prj.conf&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This approach will not use the default configuration for the image, and will require larger configuration files (ie. def_config + your wanted local configs)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would recommend that you move this file to:&lt;/p&gt;
&lt;p&gt;child_image\mcuboot.conf&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]child_image\mcuboot\boards\&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;nrf9160dk_nrf9160_mcuboot.overlay&lt;/strong&gt;&lt;/span&gt;[/quote]
&lt;p&gt;This should be child_image\mcuboot\boards\&lt;span style="text-decoration:underline;"&gt;nrf9160dk_nrf9160.overlay&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The algorithm here must follow the following rule:&lt;/p&gt;
&lt;p&gt;child_image/$image/boards/$BOARD&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that mcuboot runs in secure, so it will be &amp;quot;nrf9160dk_nrf9160&amp;quot; that is the board chosen for this child image.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]pm_static.yml[/quote]
&lt;p&gt;You have overlapping sections in this file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;external_flash:
  address: 0x0
  device: mx25r6435f
  region: external_flash
  size: 0x800000 
mcuboot_secondary:
  address: 0x0
  device: mx25r6435f
  region: external_flash
  size: 0x70000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should define &amp;quot;external_flash&amp;quot; with a start address after the end_addr of mcuboot_secondary.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since you&amp;#39;ve already setup the corresponding &amp;quot;nordic,pm-ext-flash&amp;quot; section in device-tree, you can remove (or move the pm_static.yml to a backed up location) and rely on the generated build\partitions.yml file instead.&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></channel></rss>