BLE_DFU BL653dvk Mcumgr error()

Hi,

    I am testing the DFU via BLE . and  while checking the logs I found out that it is saying  11:40:29.851 [McuMgr] Error: NOT_SUPPORTED (8) . after that msg , it is calling reset board cmd. and board is getting reset. am following below link for DFU from external flash( https://devzone.nordicsemi.com/f/nordic-q-a/83402/ncs1-8-0-52840-mcuboot-spi-external-flash-can-t-build-pass)

while searching in forum I found out this post ( https://devzone.nordicsemi.com/f/nordic-q-a/76399/ble-dfu-mcu-mgr-error-not_supported-8 ), and  I  have verified all the things which are mentioned in that post. still am getting this issue. 

Regards,

Vinay s

Parents
  • Yes, then please let us know what's the modification you made to change it from internal flash to external flash. 
    Please don't point to another case because there are lots of modification and different samples there. 

    attached one pm_static.yml file for external flash modification . here it is.

    external_flash:
      address: 0x00000
      end_address: 0x80000
      region: external_flash
      size: 0x80000
    
    mcuboot_secondary:
      address: 0x00000
      device: IS25
      end_address: 0x39000
      region: external_flash
      size: 0x39000

    in prj.conf file configured the spi to communicate with external flash . here it is.

    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="DFU_LE"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_LOG=y
    
    CONFIG_GPIO=y
    
    # CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    CONFIG_NORDIC_QSPI_NOR=n
    
    CONFIG_FLASH=y
    CONFIG_SPI=y
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32 
    
    # Enable mcumgr.
    CONFIG_MCUMGR=y
    
    # Enable most core commands.
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Allow for large Bluetooth data packets.
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    CONFIG_MCUMGR_SMP_BT=y
    CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    
    
    #CONFIG_BLR_BOARD_INIT=y
    # CONFIG_MCUBOOT_INDICATION_LED = y
    
    # CONFIG_MULTITHREADING=y
    # CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP=0
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

    Mcuboot's prj.conf file 

    #
    # Copyright (c) 2021 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # In order to provide board specific configurations to the MCUboot child image
    # we also need to provide a base configuration for MCUboot. This file contains
    # the basic configurations needed to successfully build and run MCUboot.
    CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP=0
    # MCUboot requires a large stack size, otherwise an MPU fault will occur
    CONFIG_MAIN_STACK_SIZE=10240
    
    #CONFIG_DEBUG_OPTIMIZATIONS=y
    
    # Enable flash operations
    CONFIG_FLASH=y
    
    # This must be increased to accommodate the bigger images.
    CONFIG_BOOT_MAX_IMG_SECTORS=128
    
    CONFIG_LOG=y
    CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
    ### Ensure Zephyr logging changes don't use more resources
    CONFIG_LOG_DEFAULT_LEVEL=0
    ### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
    CONFIG_CBPRINTF_NANO=y
    
    CONFIG_NORDIC_QSPI_NOR=n
    
    CONFIG_SPI=y
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    
    # If you don't add this when setting CONFIG_SPI=y, you'll get a lot of undefined references from the nrfx spim driver
    # E.G. "undefined reference to `z_impl_k_sleep'"
    CONFIG_MULTITHREADING=y
    

    In overlay file also enabled the is25 external flash  as below:

    / {
    	chosen {
    		nordic,pm-ext-flash = &is25;
    	};
    };
    
    &spi1 {
    	compatible = "nordic,nrf-spim";
    	label = "SPI_1";
    	status = "okay";
    	sck-pin = <41>;
    	mosi-pin = <40>;
    	miso-pin = <4>;
    
    	cs-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
    
    	is25: is25@0 {
    		compatible = "jedec,spi-nor";
    		status = "okay";
    		label = "IS25";
    		spi-max-frequency = <8000000>;
    		reg = <0>;
    		jedec-id = [ 9d 40 13  ];
    		size = <4194304>;   ///check with yogeshh
    
    		sfdp-bfp = [
    		   e5 20 fb ff  ff ff ff 3f  44 eb 08 6b  08 3b 04 bb
    		   fe ff ff ff  ff ff 00 ff  ff ff 44 eb  0c 20 0f 52
    		   10 d8 00 ff  d6 49 c5 00  82 df 04 e3  44 03 67 38
    		   30 b0 30 b0  f7 bd d5 5c  4a 9e 29 ff  f0 50 f9 85
    		];
    	};
    };

    These are the modification did for external flash .

    Regards,

    Shikamaru

Reply
  • Yes, then please let us know what's the modification you made to change it from internal flash to external flash. 
    Please don't point to another case because there are lots of modification and different samples there. 

    attached one pm_static.yml file for external flash modification . here it is.

    external_flash:
      address: 0x00000
      end_address: 0x80000
      region: external_flash
      size: 0x80000
    
    mcuboot_secondary:
      address: 0x00000
      device: IS25
      end_address: 0x39000
      region: external_flash
      size: 0x39000

    in prj.conf file configured the spi to communicate with external flash . here it is.

    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="DFU_LE"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_LOG=y
    
    CONFIG_GPIO=y
    
    # CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    CONFIG_NORDIC_QSPI_NOR=n
    
    CONFIG_FLASH=y
    CONFIG_SPI=y
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32 
    
    # Enable mcumgr.
    CONFIG_MCUMGR=y
    
    # Enable most core commands.
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Allow for large Bluetooth data packets.
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    CONFIG_MCUMGR_SMP_BT=y
    CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    
    
    #CONFIG_BLR_BOARD_INIT=y
    # CONFIG_MCUBOOT_INDICATION_LED = y
    
    # CONFIG_MULTITHREADING=y
    # CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP=0
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

    Mcuboot's prj.conf file 

    #
    # Copyright (c) 2021 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # In order to provide board specific configurations to the MCUboot child image
    # we also need to provide a base configuration for MCUboot. This file contains
    # the basic configurations needed to successfully build and run MCUboot.
    CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP=0
    # MCUboot requires a large stack size, otherwise an MPU fault will occur
    CONFIG_MAIN_STACK_SIZE=10240
    
    #CONFIG_DEBUG_OPTIMIZATIONS=y
    
    # Enable flash operations
    CONFIG_FLASH=y
    
    # This must be increased to accommodate the bigger images.
    CONFIG_BOOT_MAX_IMG_SECTORS=128
    
    CONFIG_LOG=y
    CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
    ### Ensure Zephyr logging changes don't use more resources
    CONFIG_LOG_DEFAULT_LEVEL=0
    ### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
    CONFIG_CBPRINTF_NANO=y
    
    CONFIG_NORDIC_QSPI_NOR=n
    
    CONFIG_SPI=y
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    
    # If you don't add this when setting CONFIG_SPI=y, you'll get a lot of undefined references from the nrfx spim driver
    # E.G. "undefined reference to `z_impl_k_sleep'"
    CONFIG_MULTITHREADING=y
    

    In overlay file also enabled the is25 external flash  as below:

    / {
    	chosen {
    		nordic,pm-ext-flash = &is25;
    	};
    };
    
    &spi1 {
    	compatible = "nordic,nrf-spim";
    	label = "SPI_1";
    	status = "okay";
    	sck-pin = <41>;
    	mosi-pin = <40>;
    	miso-pin = <4>;
    
    	cs-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
    
    	is25: is25@0 {
    		compatible = "jedec,spi-nor";
    		status = "okay";
    		label = "IS25";
    		spi-max-frequency = <8000000>;
    		reg = <0>;
    		jedec-id = [ 9d 40 13  ];
    		size = <4194304>;   ///check with yogeshh
    
    		sfdp-bfp = [
    		   e5 20 fb ff  ff ff ff 3f  44 eb 08 6b  08 3b 04 bb
    		   fe ff ff ff  ff ff 00 ff  ff ff 44 eb  0c 20 0f 52
    		   10 d8 00 ff  d6 49 c5 00  82 df 04 e3  44 03 67 38
    		   30 b0 30 b0  f7 bd d5 5c  4a 9e 29 ff  f0 50 f9 85
    		];
    	};
    };

    These are the modification did for external flash .

    Regards,

    Shikamaru

Children
Related