Adafruit Feather nRF52840 Sense Not Booting with SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y, Works with Simple DFU

I am using the Adafruit Feather nRF52840 Sense with a W25Q32 external flash and MCUBoot. I can successfully read and write to external flash using NVS, and simple DFU works fine.

Issues:

  1. When I enable SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y, the device does not start.

  2. If I first flash a DFU-compatible build (without SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y), the device boots correctly.

  3. When I update via DFU to a new build with SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y, the DFU process completes successfully, but after reboot, the device does not boot.

Observations:

  • External flash (W25Q32) works fine with NVS.

  • Simple DFU works correctly if the build does not have SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y.

  • MCUBoot does not boot when SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y is enabled, whether flashed directly or updated via DFU.

Questions:

  1. Why does the device fail to start when SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y is enabled?

  2. Are there additional configurations needed for MCUBoot to work with W25Q32 external flash?

  3. Why does the device not boot after a successful DFU update using a build with SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y?

  4. How can I debug this? Are there specific MCUBoot logs, settings, or hardware checks I should look into?

  5. Is there a known issue with SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y on the Adafruit Feather nRF52840 Sense?

Any help or insights would be greatly appreciated!

Parents
  • Hello Dalvadi,

    I went over the things discussed here and was quite confused where things are.

    First of all, you mentioned using a Adafruit Feather nRF52840 Sense. Why are there builds targeting the nrf21540dk/nrf52840 target?
    I can understand using nrf52840dk/nrf52840 target and overlay it to be compatible with the Adafruit board, but the nRF21540 DK is a lot more different. In particular, it uses the nRF21540 FEM. I am a little surprised there are no runtime issues.

    Secondly, the information about the external flash isn't included in mcuboot.overlay at all. You need to add the same kind of spi1 node overlay you did for the main board in mcuboot.overlay.

    Hieu

Reply
  • Hello Dalvadi,

    I went over the things discussed here and was quite confused where things are.

    First of all, you mentioned using a Adafruit Feather nRF52840 Sense. Why are there builds targeting the nrf21540dk/nrf52840 target?
    I can understand using nrf52840dk/nrf52840 target and overlay it to be compatible with the Adafruit board, but the nRF21540 DK is a lot more different. In particular, it uses the nRF21540 FEM. I am a little surprised there are no runtime issues.

    Secondly, the information about the external flash isn't included in mcuboot.overlay at all. You need to add the same kind of spi1 node overlay you did for the main board in mcuboot.overlay.

    Hieu

Children
No Data
Related