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

Parents
  • Hi,

     

    Which example are you using as a starting-point?

    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:

    This indicates that you are using an application aware DFU process, ie. that your application is fetching the image and storing it to flash.

    This will therefore require that the application has certain configurations enabled as well as the mcuboot child_image.

    Do you have a log output from the nRF that you can share?

     

    The size in DT should be provided as bits, and you have set 512MBit (size=<536870912>; -> 64MByte), while the part number that you list:

    AT25QL641

    indicates that the flash is 64 MBit.

     

    Kind regards,

    Håkon

  • Thank you   the size has been fixed.

    The example that I have used as a starting point is this one:

     Add DFU support to your application 

    With all debugging logging enabled, the only message I am logging is:

    <inf> mcuboot_util: Swap type: revert

    When I read the image information from nRF Connect Device Manager I only see:

    Image 0

    • Slot: 0
    • Version 0.0.0
    • Hash: 0x...
    • Flags: Bootable, Active

    When I was using internal flash only, I saw information about two slots. I believe the second slot is not recognized by the MCUmgr for some reason. 

    In addition to the above in child_image/mcuboot.conf I do also have:

    CONFIG_NCS_MCUBOOT_IN_BUILD=y
     

    While in the prj.conf I have:

    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_MCUMGR=y
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    CONFIG_MCUMGR_SMP_BT=y
    
    CONFIG_FLASH=y
    CONFIG_NRFX_QSPI=y
    CONFIG_NORDIC_QSPI_NOR=y
    
    CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16
    CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
    CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n
    
    CONFIG_MCUMGR_LOG_LEVEL_DBG=y
    CONFIG_MCUMGR_IMG_MGMT_LOG_LEVEL_DBG=y
    CONFIG_MCUMGR_SMP_LOG_LEVEL_DBG=y
    CONFIG_IMG_MANAGER_LOG_LEVEL_DBG=y
    CONFIG_BT_DFU_SMP_LOG_LEVEL_DBG=y
    CONFIG_FLASH_LOG_LEVEL_DBG=y
    CONFIG_IMG_MGMT_VERBOSE_ERR=y

Reply
  • Thank you   the size has been fixed.

    The example that I have used as a starting point is this one:

     Add DFU support to your application 

    With all debugging logging enabled, the only message I am logging is:

    <inf> mcuboot_util: Swap type: revert

    When I read the image information from nRF Connect Device Manager I only see:

    Image 0

    • Slot: 0
    • Version 0.0.0
    • Hash: 0x...
    • Flags: Bootable, Active

    When I was using internal flash only, I saw information about two slots. I believe the second slot is not recognized by the MCUmgr for some reason. 

    In addition to the above in child_image/mcuboot.conf I do also have:

    CONFIG_NCS_MCUBOOT_IN_BUILD=y
     

    While in the prj.conf I have:

    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_MCUMGR=y
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    CONFIG_MCUMGR_SMP_BT=y
    
    CONFIG_FLASH=y
    CONFIG_NRFX_QSPI=y
    CONFIG_NORDIC_QSPI_NOR=y
    
    CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16
    CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
    CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n
    
    CONFIG_MCUMGR_LOG_LEVEL_DBG=y
    CONFIG_MCUMGR_IMG_MGMT_LOG_LEVEL_DBG=y
    CONFIG_MCUMGR_SMP_LOG_LEVEL_DBG=y
    CONFIG_IMG_MANAGER_LOG_LEVEL_DBG=y
    CONFIG_BT_DFU_SMP_LOG_LEVEL_DBG=y
    CONFIG_FLASH_LOG_LEVEL_DBG=y
    CONFIG_IMG_MGMT_VERBOSE_ERR=y

Children
No Data
Related