This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

use NrfConnect SDK with 52840 dongle USB CDC Shell/console

I would like to use the USB dongle with the Openthread CLI example (and eventually an open thread app) as the SDK is just too big and overpowered for my prototypes, I would like to use the USB CDC as the Shell to communicate with the CLI and zephyr.

https://github.com/zephyrproject-rtos/zephyr/issues/16761

I also looked at the Thingy applications/connectivity bridge which is similar

I can program using nrfconnect or nrfutil, but I never see the USB CDC serial port come up after programming.

I'm using nrfconnect sdk 1.4.0 os OS X 

I have added to boards

nrf52840dongle_nrf52840.overlay

/* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
*/

&uart0 {
status = "okay";
};

/ {
/*
* In some default configurations within the nRF Connect SDK,
* e.g. on nRF52840, the chosen zephyr,entropy node is &cryptocell.
* This devicetree overlay ensures that default is overridden wherever it
* is set, as this application uses the RNG node for entropy exclusively.
*/
chosen {
zephyr,entropy = &rng;
};
};

Also added a config overlay, I tried with and without some UART interrupt setting mentioned in other posts.

#
# Copyright (c) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
#

# Enable Thread 1.2 features
CONFIG_OPENTHREAD_THREAD_VERSION_1_2=y
CONFIG_OPENTHREAD_DUA=y
CONFIG_OPENTHREAD_MLR=y
CONFIG_OPENTHREAD_BACKBONE_ROUTER=y

CONFIG_GPIO=y
CONFIG_SENSOR=y
#CONFIG_BME280=y
#CONFIG_MCP9600=y
#CONFIG_ACS71020=y

# USB
CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_MANUFACTURER="Nordic Semiconductor"
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x9100
CONFIG_USB_DEVICE_PRODUCT="Zephyr UART"
CONFIG_USB_CDC_ACM=y

CONFIG_UART_SHELL_ON_DEV_NAME="CDC_ACM_0"

I also added the dongle to  Allow to sample.yaml

sample:

  description: Test OpenThread Command Line Interface.

  name: OpenThread CLI sample

tests:

  samples.openthread.cli:

    build_only: true

    build_on_all: true

    tags: openthread cli

    platform_allow: nrf52840dk_nrf52840 nrf52833dk_nrf52833 nrf52840dongle_nrf52840

Parents Reply Children
No Data
Related