<?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>Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122634/issue-with-booting-from-mcuboot-internal-flash-does-not-boot-but-after-waiting-for-long-time-boots-randomly-meanwhile-external-flash-setup-gives-flash-read-error-on-mcuboot</link><description>NCS -&amp;gt; 2.9.2 Hi, guys 
 This will be little bit big of a ticket. 
 So I recently started working with nrf9160, and I have not much dabble with M33 core as well. 
 But anyways, so I started my project with nrf9160dk board, I have encryptions running on</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Jul 2025 10:46:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122634/issue-with-booting-from-mcuboot-internal-flash-does-not-boot-but-after-waiting-for-long-time-boots-randomly-meanwhile-external-flash-setup-gives-flash-read-error-on-mcuboot" /><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541313?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 10:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6997ba1c-22c3-49a1-be1f-cc38100e7525</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;&lt;span style="font-family:inherit;"&gt;No worries, I can try to be more clear&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Your current application shows issues when you have Mcuboot + app + dual bank slot + certificates in external flash, or rather thats my understanding of when you see occasional long startup time.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;I want to verify if you see the same long startup time if you don&amp;#39;t have mcuboot, i.e that you have your app starting at the first address without any bootloaders.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;If I&amp;#39;ve understood this correct &lt;em&gt;&amp;quot;The application works fine without mcuboot and boots properly, as I have already tested complete application with certs in external flash&amp;quot;,&amp;nbsp;&lt;/em&gt;this means that you&amp;#39;ve already verified that this works, i.e app boots properly without MCUboot.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;If this means you&amp;#39;ve verified that this works you&amp;#39;ve also verified that it is not an issue with having the certificates on the external flash.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;[quote user="AHaug"]Verify that the address that MCUboot attempts to boot does indeed match the start address of the application[/quote]
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;If 1 is all good, we can investigate the full application again. MCUboot will try to look for the application at a certain address. Have you verified that this address corresponds to the address&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;Let&amp;#39;s look closer into the pm_static. Here&amp;#39;s some points from an earlier discussion I&amp;#39;ve had w.r.t partitioning.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;This page I believe might be critical, so please review this&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/tfm/tfm_building.html#tf-m_partition_alignment_requirements"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/tfm/tfm_building.html#tf-m_partition_alignment_requirements&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Could you check if &amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_NRF_TRUSTZONE_FLASH_REGION_SIZE"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_NRF_TRUSTZONE_FLASH_REGION_SIZE&lt;/a&gt;&amp;nbsp;defaults to 0x8000 in the generated .conf file in your build folder?&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_NRF_TRUSTZONE_FLASH_REGION_SIZE"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;1.&amp;nbsp;&lt;strong&gt;Multiple Gaps in the Partition Table&lt;/strong&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;Go through the pm_static and look for gaps in the addresses. If there&amp;#39;s something not matching up, you may get an error like:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;Partition manager failed: Incorrect amount of gaps found in static configuration. There must be exactly one gap in the static configuration to support placing the dynamic partitions (such as &amp;#39;app&amp;#39;).&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;In your file, you have two&amp;nbsp;&lt;code dir="ltr"&gt;EMPTY&lt;/code&gt;&amp;nbsp;partitions (&lt;code dir="ltr"&gt;EMPTY_0&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code dir="ltr"&gt;EMPTY_1&lt;/code&gt;), which may result in two gaps, depending on how the rest of the flash is covered. &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/scripts/partition_manager/partition_manager.html#configuring_static_partitions" rel="noopener noreferrer" target="_blank"&gt;Configuring static partitions&lt;/a&gt;].&lt;/span&gt;&lt;/div&gt;
&lt;h5&gt;&lt;span style="font-family:inherit;"&gt;2.&amp;nbsp;&lt;strong&gt;Partition Overlaps and Spans&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;Your&amp;nbsp;&lt;code dir="ltr"&gt;mcuboot_primary&lt;/code&gt;&amp;nbsp;partition spans&amp;nbsp;&lt;code dir="ltr"&gt;tfm&lt;/code&gt;,&amp;nbsp;&lt;code dir="ltr"&gt;mcuboot_pad&lt;/code&gt;, and&amp;nbsp;&lt;code dir="ltr"&gt;app&lt;/code&gt;. Your&amp;nbsp;&lt;code dir="ltr"&gt;mcuboot_primary_app&lt;/code&gt;&amp;nbsp;also spans both&amp;nbsp;&lt;code dir="ltr"&gt;app&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code dir="ltr"&gt;tfm&lt;/code&gt;. This is generally valid, but you must ensure that none of the span items are themselves span partitions, as this can cause errors in some Partition Manager versions [&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/118239/sysbuild-mcuboot-custom-pm_static-yml-partition-table-matches-default-layout-but-will-not-build/520284" rel="noopener noreferrer" target="_blank"&gt;Forum: span partition issue&lt;/a&gt;].&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;The&amp;nbsp;&lt;code dir="ltr"&gt;tfm&lt;/code&gt;&amp;nbsp;partition is inside&amp;nbsp;&lt;code dir="ltr"&gt;mcuboot_primary_app&lt;/code&gt;, and&amp;nbsp;&lt;code dir="ltr"&gt;tfm_secure&lt;/code&gt;&amp;nbsp;spans&amp;nbsp;&lt;code dir="ltr"&gt;mcuboot_pad&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code dir="ltr"&gt;tfm&lt;/code&gt;. This is a common pattern, but you must ensure that the address ranges and sizes match up exactly and do not overlap incorrectly.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;&lt;span style="font-family:inherit;"&gt;3.&amp;nbsp;&lt;strong&gt;Alignment&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;The&amp;nbsp;&lt;code dir="ltr"&gt;mcuboot_pad&lt;/code&gt;&amp;nbsp;partition is aligned to&amp;nbsp;&lt;code dir="ltr"&gt;0x8000&lt;/code&gt;, which is typical for nRF9160/5340 devices, but you should verify that this matches your device&amp;#39;s erase block size and&amp;nbsp;&lt;code dir="ltr"&gt;CONFIG_NRF_SPU_FLASH_REGION_SIZE&lt;/code&gt;&amp;nbsp;if using TrustZone/TF-M [&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/114935/thingy91-nrf9160-sdk-v2-6-1-tf-m-partition-alignment-error-for-static-partitions" rel="noopener noreferrer" target="_blank"&gt;Partition alignment&lt;/a&gt;].&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;&lt;span style="font-family:inherit;"&gt;4.&amp;nbsp;&lt;strong&gt;Partition Coverage&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;Ensure that all of&amp;nbsp;&lt;code dir="ltr"&gt;flash_primary&lt;/code&gt;&amp;nbsp;is covered by your partitions, except for a single gap (if any). If you have two&amp;nbsp;&lt;code dir="ltr"&gt;EMPTY&lt;/code&gt;&amp;nbsp;partitions, you may be unintentionally creating two gaps, which is not allowed.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;&lt;span style="font-family:inherit;"&gt;5.&amp;nbsp;&lt;strong&gt;Use of&amp;nbsp;&lt;code dir="ltr"&gt;app&lt;/code&gt;&amp;nbsp;Partition&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;Note that if the static configuration contains an entry for the&amp;nbsp;&lt;code dir="ltr"&gt;app&lt;/code&gt;&amp;nbsp;partition, this entry is ignored by Partition Manager. The&amp;nbsp;&lt;code dir="ltr"&gt;app&lt;/code&gt;&amp;nbsp;partition is dynamically generated based on the other partitions [&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/scripts/partition_manager/partition_manager.html#configuring_static_partitions" rel="noopener noreferrer" target="_blank"&gt;Configuring static partitions&lt;/a&gt;].&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541187?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 13:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcab9d92-5b8e-43f6-9dc7-c4698a329d60</guid><dc:creator>Haseeb Zaib</dc:creator><description>[quote userid="107683" url="~/f/nordic-q-a/122634/issue-with-booting-from-mcuboot-internal-flash-does-not-boot-but-after-waiting-for-long-time-boots-randomly-meanwhile-external-flash-setup-gives-flash-read-error-on-mcuboot/541177"]&lt;ul&gt;&lt;li&gt;Could you remove MCUboot and attempt to just have the application (and potentially certificates on external flash) and see if this has the same behavior? If so, then we&amp;#39;ve isolated that the issue is in the application.&lt;/li&gt;
&lt;li&gt;The next thing is to check if it&amp;#39;s because of the certificates on the external flash, i.e have no bootloader + certificates on internal flash&lt;/li&gt;&lt;/ul&gt;[/quote]
&lt;p&gt;sorry I dont get&amp;nbsp;these point of yours&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/122634/issue-with-booting-from-mcuboot-internal-flash-does-not-boot-but-after-waiting-for-long-time-boots-randomly-meanwhile-external-flash-setup-gives-flash-read-error-on-mcuboot/541177"]Could you remove MCUboot and attempt to just have the application (and potentially certificates on external flash) and see if this has the same behavior? If so, then we&amp;#39;ve isolated that the issue is in the application.[/quote]
&lt;p&gt;The application works fine without mcuboot and boots properly, as I have already tested complete application with certs in external flash&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/122634/issue-with-booting-from-mcuboot-internal-flash-does-not-boot-but-after-waiting-for-long-time-boots-randomly-meanwhile-external-flash-setup-gives-flash-read-error-on-mcuboot/541177"]The next thing is to check if it&amp;#39;s because of the certificates on the external flash, i.e have no bootloader + certificates on internal flash[/quote]
&lt;p&gt;I dont get it I think you meant I keep certs in internal flash and then try mcuboot right ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541177?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 13:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1323436-d528-4068-b32f-dabb3eaea4ed</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Haseeb Zaib"]As you can see now in output, all the warning are not even showing and mcuboot is showing correct outputs now but still when its jump to first image slot it get stuck and my application is never booted[/quote]
&lt;p&gt;Thats good, then we&amp;#39;ve removed one uncertainty from the equation. Based on what you&amp;#39;re describing it seems to me that this is not caused by the bootloader and that there may be some softlock in app start, i.e the fault is isolated to the application&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s some suggestions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify that the address that MCUboot attempts to boot does indeed match the start address of the application&lt;/li&gt;
&lt;li&gt;Could you remove MCUboot and attempt to just have the application (and potentially certificates on external flash) and see if this has the same behavior? If so, then we&amp;#39;ve isolated that the issue is in the application.&lt;/li&gt;
&lt;li&gt;The next thing is to check if it&amp;#39;s because of the certificates on the external flash, i.e have no bootloader + certificates on internal flash&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541117?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 07:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27cef2fe-a9d2-45ef-ac35-08199a90bed2</guid><dc:creator>Haseeb Zaib</dc:creator><description>&lt;p&gt;Also I tried external flash with hello_world program and my system immediately booted into application&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751439704620v1.png" /&gt;&lt;br /&gt;&lt;br /&gt;Also I added my above crypto.conf to project and hello_world application still booted&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751440081246v2.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also I kept same partitions for both projects hello_world and my main application&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am using external flash in my application as well to store certificates may that could be an issue ?? I kept address space different ofcourse but still&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751440286906v3.png" /&gt;&lt;br /&gt;&lt;br /&gt;Inside this library I am using normal flash_write,erase and read functions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BTW here is my code&amp;nbsp;&lt;a id="" href="https://github.com/haseebzaib/GasSensor_Device"&gt;https://github.com/haseebzaib/GasSensor_Device&lt;/a&gt;&lt;br /&gt;maybe will be easier to test on your side as well&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541110?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 06:14:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0db0fa88-f006-47d5-97e7-a0f7f4fbe8cf</guid><dc:creator>Haseeb Zaib</dc:creator><description>&lt;p&gt;my hunch is that, when the issue is with following crypto.conf file in my project&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# ---------- TF-M integration ----------
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y     # pick secure services by hand

# ---------- nRF Security + PSA layer ----------
CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y

# ---------- use CryptoCell hardware driver ----------
CONFIG_PSA_CRYPTO_DRIVER_CC3XX=y
CONFIG_PSA_CRYPTO_DRIVER_OBERON=y

# ---------- algorithms &amp;amp; key-types  ----------
CONFIG_PSA_WANT_ALG_ECDH=y
CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE=y
CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT=y
CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT=y
#CONFIG_PSA_WANT_ECC_CURVE_CURVE25519=y
#following gives Curve25519 support
CONFIG_PSA_WANT_ECC_MONTGOMERY_255=y

#---------- key-derivation &amp;amp; hash for post-ECDH ----------
CONFIG_PSA_WANT_ALG_HKDF=y
CONFIG_PSA_WANT_ALG_SHA_256=y
CONFIG_PSA_WANT_ALG_HMAC=y
CONFIG_PSA_WANT_KEY_TYPE_HMAC=y
#----------- CHACHA20 poly1305 -------------
CONFIG_PSA_WANT_KEY_TYPE_CHACHA20=y
CONFIG_PSA_WANT_ALG_CHACHA20_POLY1305=y

# ---------- entropy source for key generation ----------
CONFIG_PSA_WANT_GENERATE_RANDOM=y
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;maybe&amp;nbsp;CONFIG_TFM_PROFILE_TYPE_NOT_SET=y&amp;nbsp;&lt;br /&gt;&lt;br /&gt;it is not sitting well with mcuboot ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541105?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 05:57:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:034efe5b-dbc3-4477-8cdb-c2e1b2fada29</guid><dc:creator>Haseeb Zaib</dc:creator><description>&lt;p&gt;okay so after going through some resources and also following nrf connect intermediate guide I was able to use external flash as an secondary storage&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751435668603v1.png" /&gt;&lt;br /&gt;This auto generated parition.yml file&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751435720822v2.png" /&gt;&lt;br /&gt;As you can see now in output, all the warning are not even showing and mcuboot is showing correct outputs now but still when its jump to first image slot it get stuck and my application is never booted&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After testing this I implemented my own static_pm.yml file&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;autoconf.h&amp;gt;
EMPTY_0:
  address: 0xF000
  end_address: 0x10000
  placement:
    before:
    - mcuboot_pad
  region: flash_primary
  size: 0x1000
app:
  address: 0x68000
  end_address: 0xD8000
  region: flash_primary
  size: 0x70000
mcuboot:
  address: 0x0
  end_address: 0xF000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xF000
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: 0xD8000
  orig_span: &amp;amp;id001
  - tfm
  - mcuboot_pad
  - app
  region: flash_primary
  sharers: 0x1
  size: 0xC8000
  span: *id001
mcuboot_primary_app:
  address: 0x10200
  end_address: 0xD8000
  orig_span: &amp;amp;id002
  - app
  - tfm
  region: flash_primary
  size: 0xC7E00
  span: *id002
otp:
  address: 0xff8108
  end_address: 0xff83fc
  region: otp
  size: 0x2f4
tfm:
  address: 0x10200
  end_address: 0x68000
  inside:
  - mcuboot_primary_app
  placement:
    before:
    - app
  region: flash_primary
  size: 0x57E00
tfm_secure:
  address: 0x10000
  end_address: 0x68000
  orig_span: &amp;amp;id008
  - mcuboot_pad
  - tfm
  region: flash_primary
  size: 0x58000
  span: *id008
tfm_nonsecure:
  address: 0x68000
  end_address: 0xD8000
  orig_span: &amp;amp;id007
  - app
  region: flash_primary
  size: 0x70000
  span: *id007
external_flash:
  address: 0x0
  device: mx25r64
  end_address: 0x800000
  region: external_flash
  size: 0x800000
mcuboot_secondary:
  address: 0x0
  device: mx25r64
  region: external_flash
  size: 0xC8000&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The same response with this one&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So there is definitely something going on with my application code I feel like that does not let mcuboot jump to it&lt;br /&gt;&lt;br /&gt;what are your speculation ?&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541050?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2025 13:38:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ac26d3e-2cae-4b96-8d6b-4b368526f8b9</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Great, keep me posted.&lt;/p&gt;
&lt;p&gt;To be honest I expect it to be unrelated to the external flash, but since the docs mention the same output that you showcased I think it&amp;#39;s worth to isolate if this is the reason or not before we start speculating out of thin air!&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541039?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2025 13:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33b7e823-e1d7-4441-a748-50ebf495da08</guid><dc:creator>Haseeb Zaib</dc:creator><description>&lt;p&gt;Thank you for your detail answer.&lt;/p&gt;
&lt;p&gt;I understand it, tomorrow I will test it more thoroughly and get back to you.&lt;br /&gt;&lt;br /&gt;Although I tested external flash as well and I was getting an issue that mcuboot was not able to read and write to the flash I isolated that issue but will get back to it later after I solve this issue of simply booting into my application&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541036?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2025 12:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26717a21-4e02-435a-b355-82f13d2f9192</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Ah, I see. Then the reason for the long boot time should not be related to any mismatch in addresses. Anyways, when you get to setting up the external flash and OTA solution, feel free to review those links.&lt;/p&gt;
&lt;p&gt;The warning you see in the boot procedure picture you attached stems from this reasoning, at least; MCUboot requires that both the primary and secondary image slots have compatible sector layouts and sizes. If the slots have different sector sizes or counts, MCUboot cannot perform the swap upgrade and will issue this warning. This is especially important when using external flash, as the sector size or count may differ from internal flash.&lt;/p&gt;
&lt;p&gt;From what I can see, you&amp;#39;ve disabled the 3 configurations w.r.t to the secondary slot on the external flash, and no partitions resides on the external flash component you&amp;#39;ve defined in the pm_static, but there may be something here triggering it nonetheless.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_partitioning.html#troubleshooting"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_partitioning.html#troubleshooting&lt;/a&gt;&amp;nbsp; showcases the same output window that you attached as well with some hints as to what may be going wrong here&lt;/p&gt;
[quote user=""]And the funny thing is sometimes it boots into application but after hours of waiting here. As I left it like this yesterday and the application was booted and I again restarted the mcu the application got stuck here[/quote]
&lt;p&gt;This behavior isn&amp;#39;t typical and not something I&amp;#39;m aware others have experience in other cases so the best approach to isolate this issue is to either see if it&amp;#39;s resolved if you properly set up the sectors and partition sizes or to do some debugging and find out where in the bootloader the application either gets stuck, hangs or resets&lt;/p&gt;
&lt;p&gt;In case you need some resources to get started:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/topic/debugging-in-vs-code/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/topic/debugging-in-vs-code/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541032?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2025 12:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d6db03e-94e4-4a91-b0f7-2a7b9f332503</guid><dc:creator>Haseeb Zaib</dc:creator><description>&lt;p&gt;yes I gave that size because right now I dont want to load any application to secondary slot.&lt;br /&gt;I only want my system to load into my application thats all, basically I just want right now the mcuboot to jump to my main application and I think it should as it wont get any header on secondary slot and it should jump to primary.&lt;br /&gt;&lt;br /&gt;Thats the reason I kept secondary slot that low memory footprint.&lt;br /&gt;&lt;br /&gt;As you can see the mcuboot says it jumps and I also mentioned that I left it like this yesterday when I came back to it in the morning surprisingly my application was working&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with booting from mcuboot. Internal flash does not boot but after waiting for long time boots randomly. Meanwhile External flash setup gives flash read error on mcuboot</title><link>https://devzone.nordicsemi.com/thread/541025?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2025 11:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9d77891-4391-4b2a-8992-72b63019b2d5</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The size of the secondary mcuboot partition has me a bit interested.&lt;/p&gt;
&lt;p&gt;The size is 0x8000 in both your defined pm_static and the generated partitioning map, whereas it should be the same size as your primary mcuboot application slot.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751369949662v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I think that maybe this course on our academy pages with theory for DFU in NCS could be helpful&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There&amp;#39;s lessons (with solutions) for your use case, i.e OTA with external flash and a lesson for LTE OTA (if that&amp;#39;s the end goal) as well as BLE OTA.&lt;/p&gt;
&lt;p&gt;Let me know if you&amp;#39;ve reviewed this topic on the pages already or not&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>