nRF52833, Using MCUBoot with an external at45db641e flash drive for DFU

We are trying to understand whether it is possible to use our external flash drive at45db641e to implement DFU and then load the application firmware via Bluetooth.
As far as I know, the at45db641e is not an SPI NOR, and I was able to add it to the project by analogy with the existing example:
https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/topic/exercise-3-dfu-with-external-flash/


We defined the external flash in the .overlay file as:

&spi2 {
status = "okay";
pinctrl-0 = <&spi2_default>;
pinctrl-1 = <&spi2_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;

at45db0: at45db641e@0 {
compatible = "atmel,at45";
reg = <0>;
spi-max-frequency = <15000000>;
jedec-id = [1f 28 00];
size = <67108864>;
sector-size = <262144>;
block-size = <2048>;
page-size = <256>;
enter-dpd-delay = <2000>;
exit-dpd-delay = <100000>;
status = "okay";

#address-cells = <1>;
#size-cells = <1>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

ext_flash_area: partition@0 {
label = "external_flash";
reg = <0x00000000 0x0800000>; /* 8 MB */
};
};
};
};

and by analogy, for mcuboot.overlay.
Can we use this ext flash? If so, what files should we attach to you for analyze?





  • Hi  ,
    I added: CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y to mcuboot.conf, but nothing changed.
    The same errors:
    *** Booting MCUboot v2.1.0-dev-daf2946a0f07 ***
    *** Using nRF Connect SDK v2.7.0-5cb85570ca43 ***
    *** Using Zephyr OS v3.6.99-100befc70c74 ***
    I: Starting bootloader
    E: Failed to open flash area ID 1 (image 0 slot 1): -2, cannot continue

    Current mcuboot.cong:

    CONFIG_GPIO=y
    CONFIG_SPI=y
    CONFIG_NORDIC_QSPI_NOR=n
    CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

    # required by SPI driver
    CONFIG_MULTITHREADING=y
    CONFIG_KERNEL=n


    2146.mcuboot.conf

  • Hi,

    The CONFIG_KERNEL symbol is not defined by the SDK, so unless you have defined it, I would have expected a build error. Please check the generated .config for your mcuboot build to confirm whether PM_OVERRIDE_EXTERNAL_DRIVER_CHECK and your other configuration overlays are applied or not.

      

  • I encountered the same problem as you. Have you solved it now? How did you do it?



    *** Booting MCUboot v2.3.0-dev-0d9411f5dda3 ***
    *** Using nRF Connect SDK v3.2.0-5dcc6bd39b0f ***
    *** Using Zephyr OS v4.2.99-a57ad913cf4e ***
    I: Starting bootloader
    D: context_boot_go
    SPI3 device is ready
    Trying to open flash area: [1:2]image=0, slot=0, fa_id=3
    Trying to open flash area: [1:2]image=0, slot=1, fa_id=1
    FAILED: flash_area_open returned -2 for slot 1
    ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/lib/libc/picolibc/assert.c:15
    assertion "rc == 0" failed: file "WEST_TOPDIR/bootloader/mcuboot/boot/bootutil/src/bootutil_loader.c", line 400, function: boot_open_all_flash_areas

  • The error indicates that the (Q)SPI NOR driver initialisation failed. Please create a new a thread and include as much relevant details as possible for your setup. 

Related