<?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 MCUboot + mcumgr FOTA using 2 MB SPI external flash (-19 Failed to open flash area)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123633/issue-with-mcuboot-mcumgr-fota-using-2-mb-spi-external-flash--19-failed-to-open-flash-area</link><description>Hi Team, 
 I’m facing an issue when trying to perform BLE FOTA with a 2 MB external SPI flash (SPI4) as the secondary slot for MCUboot. 
 My setup works fine when using a QSPI 8 MB flash on the Nordic Dev Kit without a custom pm_static.yml — but when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Aug 2025 07:55:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123633/issue-with-mcuboot-mcumgr-fota-using-2-mb-spi-external-flash--19-failed-to-open-flash-area" /><item><title>RE: Issue with MCUboot + mcumgr FOTA using 2 MB SPI external flash (-19 Failed to open flash area)</title><link>https://devzone.nordicsemi.com/thread/545320?ContentTypeID=1</link><pubDate>Tue, 12 Aug 2025 07:55:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ab806f3-5d5b-415f-97b7-89868fb36d43</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hello!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There&amp;#39;s a couple if items here that I believe might be the root cause to your issues.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;1.Is there a known limitation in NCS/MCUboot for using SPI NOR (non-QSPI) flash as the secondary slot for BLE FOTA?&lt;/p&gt;
&lt;p&gt;2.Are there additional configs or hooks needed to make flash_area_open() work with SPI NOR in MCUboot?&lt;/p&gt;[/quote]
&lt;ol&gt;
&lt;li&gt;The first is that QSPI is not properly disabled, and the reason is a bit hidden. This should answer both your first and second question about qspi and additional configs.&lt;br /&gt;&lt;br /&gt;You can see that you still have QSPI enabled by examining the generated .config file located at build/zephyr/.config. If you search for &amp;quot;qspi&amp;quot; you can see &amp;quot;CONFIG_DT_HAS_NORDIC_QSPI_NOR_ENABLED=y&amp;quot; (and a couple more items). The reason is simply that it is not sufficient to only disable the qspi node in dts by setting stats=&amp;quot;disabled&amp;quot;;, you also need to make sure you&amp;#39;re not using a configuration that enables QSPI.&lt;br /&gt;&lt;br /&gt;From the solution of the academy course you&amp;#39;ve set the following:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# # Enable Bluetooth and SMP for mcumgr
# CONFIG_MCUMGR_SMP_BT=y
# CONFIG_MCUMGR_SMP=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

# CONFIG_SPI=y

# CONFIG_SPI=y
# CONFIG_FLASH=y
# CONFIG_FLASH_MAP=y
# CONFIG_SPI_NOR=y
# CONFIG_NORDIC_QSPI_NOR=y

# prj.conf (your application)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I.e you&amp;#39;ve not defined CONFIG_SPI and CONFIG_QSPI_NOR for your application, whereas in child_image/mcuboot.conf you have&amp;nbsp;CONFIG_NORDIC_QSPI_NOR=n and CONFIG_SPI=y and CONFIG_SPI_NOR=y. This means that only MCUboot knows that QSPI to be disabled and SPI enabled.&lt;br /&gt;&lt;br /&gt;The second thing is that the configuration&amp;nbsp;CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y implies quite a few configurations. By using the Kconfig search you can see which:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU"&gt;https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&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/pastedimage1754984914412v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;In Zephyr, an Imply is stronger than what you define in the prj.conf. In the case of the NCS_SAMPLE configuration it implies QSPI to be enabled even though you think you disable it.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Unfortunately for NCS v2.6.1 the academy course w.r.t bootloaders is rather limited, but you can see how to set up an external flash with SPI communication for NCS 2.6.1 here&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v2.6.2/samples/net/aws_iot/child_image/mcuboot/boards"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v2.6.2/samples/net/aws_iot/child_image/mcuboot/boards&lt;/a&gt;. This is referred to by the course from here:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/topic/exercise-3-dfu-with-external-flash/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/topic/exercise-3-dfu-with-external-flash/&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;br /&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/pastedimage1754985107207v3.png" alt=" " /&gt;&amp;nbsp; &amp;nbsp;-----&amp;gt; to &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/topic/exercise-2-dfu-over-usb-adding-external-flash/"&gt;here&amp;nbsp;&lt;/a&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/pastedimage1754985127986v4.png" alt=" " /&gt;&amp;nbsp;&amp;nbsp;---&amp;gt; to &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v2.6.2/samples/net/aws_iot/child_image/mcuboot/boards"&gt;here&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In NCS 2.9.0 and newer, Exercise 3 contains steps for setting up an external flash with SPI communication.&lt;/li&gt;
&lt;/ol&gt;
[quote user=""]3.Could you confirm if the provided pm_static.yml approach is correct for this use case?[/quote]
&lt;p&gt;I&amp;#39;ve not had the deepest look at it, but initial lookthrough seems to look fine. Just make sure that your start and end addresses for your partitions are page aligned&amp;nbsp;&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>