This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DFU over BLE + MCUboot + External Flash QSPI: "MGMT_ERR_ENOENT"

Hi,

I am working with nRF52840 SoC (custom board) and AT25QL641 QSPI Flash chip. I am on v2.1.0 of nRF Connect SDK. The slot1 (update slot) is on an external flash. 

Whenever I try to upload the update image from nRF Connect Device Manager I get "Remote error: No Entry (5)". This is translated from a  "MGMT_ERR_ENOENT" error code return from img_mgmt_read_info() of MCUmanager. I have seen this thread with a similar issue:

 Failure in mgmt while trying to upgrade the app using external flash as secondary slot 

but increasing stack sizes did not resolve my issue.

I have also looked through a number of DFU+MCUboot+External Flash threads to get to this point. It is possible that this issue is related to the partition manager or MCUboot configuration since I have had prior issues with those.  

My child_image/mcuboot.conf looks like this:

CONFIG_PINCTRL=y
CONFIG_FLASH=y
CONFIG_NRFX_QSPI=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16

CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
CONFIG_BOOT_MAX_IMG_SECTORS=256
CONFIG_PM_EXTERNAL_FLASH_BASE=0x0
 

I don't use a static partition file.


The device tree is modified in the following way:

/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;

// Extending boot partition in internal flash (since slot1 will be moved)
&flash0{
    partitions {
        slot0_partition: partition@c000 {
            label = "image-0";
            reg = <0xc000 0xE4000>;
        }; 
    };
};

&qspi {
	status = "okay";
	pinctrl-0 = <&qspi_default>;
    pinctrl-1 = <&qspi_sleep>;
	pinctrl-names = "default", "sleep";
	at25ql641: at25ql641@0 {
		compatible = "nordic,qspi-nor";
        reg = < 0 >;
        jedec-id = [ 1F 43 17 ];
        sck-frequency = < 133000000 >;
        //size-in-bytes = < 67108864 >; Does not work with partition manager
        size=<536870912>; 
        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;
            slot1_partition: partition@0 {
                label = "image-1";
                reg = <0x0 0x0E4000>;
            };
        };
	};
};

/ {
    chosen {
        nordic,pm-ext-flash = &at25ql641;
    };
};

I have already applied the "partition_manager.cmake" fix from this thread:

 RE: nRF9160dk FOTA using external flash, ncs 2.0.2 

Finally, I have also confirmed that I am able to read and write to external flash from the application itself.

Thank you,

Andy

Related