PM Partitions and external flash

Hello

I have a custom nrf52840 board with an external 1MB NOR flash

The app uses MCUboot for DFU


I know I can define the external flash in the pm_static.yml for the main app

i.e 

external_flash:
address: <set address here>
region: external_flash
size: <set size here>

I would like to use the internal flash for slot0 image and external flash for slot1 image for DFU

How can I define my external flash to be the 

slot1_partition where the DFU image will be loaded?
Thanks
Parents Reply
  • The  MCUboot with external flash test code you referred me to uses  mx25r64 NOR flash i.e
    / {
    chosen {
    nordic,pm-ext-flash = &mx25r64;
    };
    };
    What if I have a different part? Is there a generic driver that I can use?
    Also
    1. My SDK 2.6.1 does not have SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY  - at least I couldnt find it .

    2. I don't see the test project setting CONFIG_NORDIC_QSPI_NOR=y or any other settings related to external flash.

    Is there a full example available?
    Thanks
Children
  • Hi, 

    AndyM said:
    What if I have a different part? Is there a generic driver that I can use?

    Our QSPI NOR driver is designed to be fairly generic and should work with many SPI NOR flash devices, not just the mx25r64. However, you will need to make some modifications to the device tree overlay file to match your specific flash chip.

    The spi_nor driver in Zephyr (which Nordic Connect SDK is based on) is quite generic. You can modify the device tree overlay file to configure it for your specific flash chip. See this jesd216 sample.
    AndyM said:
    1. My SDK 2.6.1 does not have SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY  - at least I couldnt find it .

    NCS v2.6.1 is not forced to use sysbild. You can use CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY in NCS v2.6.1.

    AndyM said:
    2. I don't see the test project setting CONFIG_NORDIC_QSPI_NOR=y or any other settings related to external flash.

    See this spi_flash sample. 

    Regards,
    Amanda H.

     
Related