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 switching to SPI-based 2 MB flash on my custom board,
MCUboot cannot access the secondary slot.
Board & Environment
nRF board: Custom board based on nRF5340
SDK: nRF Connect SDK v2.6.1
Bootloader: MCUboot (child image)
External flash: 2 MB, SPI interface (SPI4 bus)
FOTA method: mcumgr over BLE
Partitioning: Using pm_static.yml to map slot1 to external flash
Problem
When attempting to upload an image with mcumgr, the device logs show that MCUboot treats the secondary slot as unreachable,
and mcumgr fails with -19 (ENODEV) when opening the external flash area.
Log output (relevant section):
[00:00:12.667,205] <dbg> mcumgr_img_grp: img_mgmt_active_slot: (0) => 0
[00:00:12.667,236] <inf> mcuboot_util: Secondary image of image pair (0.) is unreachable. Treat it as empty
[00:00:12.667,266] <dbg> mcumgr_img_grp: img_mgmt_get_next_boot_slot: (0, *) => slot = 0, type = 0
[00:00:12.667,266] <dbg> mcumgr_img_grp: img_mgmt_active_slot: (0) => 0
[00:00:12.667,419] <err> mcumgr_img_grp: Failed to open flash area ID 3: -19
Steps Already Tried:
1.Configured pm_static.yml so mcuboot_secondary maps to the external flash region.
2.Verified SPI4 wiring and device tree configuration for the external flash.
3.Enabled debug logs in both prj.conf and child_image/mcuboot.conf.
4.Confirmed that CONFIG_PM_EXTERNAL_FLASH=y is not available for SPI flash.
5.Checked device-tree that nordic_pm_ext_flash points to the correct SPI NOR device.
Question:
1.Is there a known limitation in NCS/MCUboot for using SPI NOR (non-QSPI) flash as the secondary slot for BLE FOTA?
2.Are there additional configs or hooks needed to make flash_area_open() work with SPI NOR in MCUboot?
3.Could you confirm if the provided pm_static.yml approach is correct for this use case?
I have attached:
Project zip file here
inter_less8_exer2_solution_120825.zip
pm_static.yml
child_image/mcuboot.overlay
child_image/mcuboot.conf
prj.conf


-----> to
---> to