NCS DFU Supported External Flash Devices

OS: Windows

NCS: 2.2.0

We have discovered that we do not have enough internal flash space to support BLE DFU and need to add an external flash to our nRF52833-based design.

The nRF52840 DK board has an external flash (MX25R64) and BLE DFU is shown to work with the bus configured as SPI or QSPI.

 https://devzone.nordicsemi.com/f/nordic-q-a/82430/ncs-external-flash-ota-change-qspi-to-spi/345238

Our board is very small, so the MX25R64 is simply too physically large, so we are looking at the Gigadevices GD25WD40E/20E.  It is tiny at 1.2x1.2mm and supports SPI bus.

https://www.mouser.com/datasheet/2/870/gd25wd40e_gd25wd20e_datasheet_rev1_1_20221019-3081635.pdf

We have no way of verifying this device without doing another version of the board.  That is a big risk.

1.  Is there a specific memory layout of the flash for NCS DFU to work?  For example, the Gigadevices part's memory layout looks like:

2. Is there a specific list of SPI/QSPI flash devices that work with NCS DFU?

  • I just read through Hakon's response to my private case.  Now I see what you mean.  I will test it and update everyone.

  • The missing items were:

    In child_image/mcuboot/boards/o1-agg-nrf52833.conf
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32
    CONFIG_LOG=y
    CONFIG_LOG_MODE_MINIMAL=y
    CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

    In prj.conf
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32
    CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

    Explicitly setting the flash layout page size fixed it.

    PS C:\Virtuix\nordic\myapps\hello_world_dfu_833DK_ext_flash\build> west build -t partition_manager_report
    -- west build: running target partition_manager_report
    [1/1] cmd.exe /C "cd /D C:\Virtuix\nordic\myapps\hello_world_.../myapps/hello_world_dfu_833DK_ext_flash/build/partitions.yml" external_flash (0x100000 - 1024kB):
    +-------------------------------------------+
    | 0x0: mcuboot_secondary (0x71000 - 452kB) |
    | 0x71000: external_flash (0x8f000 - 572kB) |
    +-------------------------------------------+

    flash_primary (0x80000 - 512kB):
    +-------------------------------------------------+
    | 0x0: mcuboot (0xf000 - 60kB) |
    +---0xf000: mcuboot_primary (0x71000 - 452kB)-----+
    | 0xf000: mcuboot_pad (0x200 - 512B) |
    +---0xf200: mcuboot_primary_app (0x70e00 - 451kB)-+
    | 0xf200: app (0x70e00 - 451kB) |
    +-------------------------------------------------+

    sram_primary (0x20000 - 128kB):
    +--------------------------------------------+
    | 0x20000000: sram_primary (0x20000 - 128kB) |
    +--------------------------------------------+

    PS C:\Virtuix\nordic\myapps\hello_world_dfu_833DK_ext_flash\build>

    Kenneth - Thanks for all the help!  Nordic's next dev academy should be DFU!  

    I have attached the working project.

    8551.hello_world_dfu_833DK_ext_flash.zip

Related