Using SMP Server & MCUMgr for Serial DFU with USB CDC_ACM as the backend

Greetings,

I am currently working on our new product using nRF52840 and have succesfully inluded SMP Server in our application for the purpose of performing DFU using Serial and BLE OTA with great success (using this guide).

Now I would like to use the USB CDC_ACM as the physical layer/backend for the serial DFU so that instead of connecting via the UART RX/TX pins I can connect via the MCU USB port.

I have followed the documentation of SMP Server (selected the USB CDC_ACM tab and copied the contents of the overlay-cdc.conf & the usb.overlay files  to my projects prj.conf and cutom-board.dts) and the application builds with no errors but when flashed connecting a USB cable between our custom board and the PC it is not recognised as a device in Windows Device Manager.

Is there something I am missing regarding configuration options or the device tree.

Below I have provided code snippets of the .conf and .dts files of our application and the lines I added according to the Zephyr documentation of the SMP Server linked above (all other configuration options for the use of SMP Server are included in my files but I have not included them here because they are .

prj.conf

# Enable USB subsystem
CONFIG_USB_DEVICE_STACK=y
CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
# USB backend is serial device
CONFIG_MCUMGR_SMP_UART=y

custom-board.dts

/ {
	chosen {
		zephyr,uart-mcumgr = &cdc_acm_uart0;
	};
};

zephyr_udc0: &usbd {
	compatible = "nordic,nrf-usbd";
	status = "okay";
};

&zephyr_udc0 {
	cdc_acm_uart0: cdc_acm_uart0 {
		compatible = "zephyr,cdc-acm-uart";
	};
};

Thank you very much for your time and I look forward to hearing from you.

Best regards,

Stavros Filippas

Parents Reply
  • Hi Amanda,

    I am not looking for MCUBoot with serial recovery as I cannot enter bootloader mode using the serial recovery on our product/custom board as it does not have an reset button.

    I need to be able to perform DFU without entering bootloader mode via serial recovery, this is the reason we are currently using the SMP Server that is already integrated in our application and can perform Serial DFU (without entering bootloader mode using button presses) over the TX/RX lines while running the application.

    But I would like to use the USB CDC_ACM backend instead and not Serial UART TX/RX pins. Is this possible??

    The example you provided configures the MCUBoot itself to communicate via USB CDC_ACM not the SMP Server on my application.

    The configuration of the USB CDC_ACM should be on the .conf file of the application not the child_image mcuboot.conf file.

    Regards,

    Stavros

Children
Related