DFU Failed on nRF5340: Flash write failed (12) with slot_index_primary = 1, App-core-only FOTA, Internal Flash, NCS v2.9.1

Hi, I'm working on enabling **FOTA for the application core only** on **nRF5340**,
based on the **`nrf5340_audio` example**, using **only internal flash** (no external flash, no net core updates).

I understand that multi-image DFU is generally recommended.
However, our application has already offloaded most functionality to the network core beforehand.
For system stability, we are using **NCS v2.9.1** and are not planning to upgrade for now.

### Exclamation️Issue

Using the **nRF Device Manager** app, DFU fails with the following:



and on serial terminal

Image index: 0, Swap type: none
mcuimg_img_grp: Irrecoverable error: flash write failed: 12


firecracker Suspected Cause
In the generated manifest.json, I see:
"slot_index_primary": "1",
"slot_index_secondary": "2"

According to MCUboot convention, this should be:
"slot_index_primary": "0",
"slot_index_secondary": "1"

I suspect this mismatch is causing the DFU to either misinterpret memory layout or reject the write.

Question Questions

  1. Why is slot_index_primary incorrectly set to 1 in the manifest?

  2. Where in NCS v2.9.1 can I modify the DFU zip generation to force --image-index 0 during signing?

  3. Is there any known bug or misconfiguration that causes this behavior in the nrf5340_audio sample?

  4. What’s the cleanest way to enable app-core-only DFU using internal flash, with reliable MCUboot behavior in NCS v2.9.1?

Any insights or pointers would be appreciated.
Attached: screenshots from MCUboot logs, nRF Device Manager output, and error dialog during DFU.

Thanks!






Related