File tree Expand file tree Collapse file tree 12 files changed +56
-45
lines changed
samples/net/openthread/coprocessor Expand file tree Collapse file tree 12 files changed +56
-45
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,8 @@ device.
339339 interprocess-communication (IPC)
340340 * - zephyr,itcm
341341 - Instruction Tightly Coupled Memory node on some Arm SoCs
342+ * - zephyr,ot-uart
343+ - Used by the OpenThread to specify UART device for Spinel protocol
342344 * - zephyr,shell-uart
343345 - Sets default :kconfig: `CONFIG_UART_SHELL_ON_DEV_NAME `
344346 * - zephyr,sram
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ Removed APIs in this release
4747* Removed support for the Kconfig ``USB `` option. Option ``USB_DEVICE_STACK ``
4848 is sufficient to enable USB device support.
4949
50+ * Removed ``CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM `` and
51+ ``CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME `` Kconfig options
52+ in favor of chosen node ``zephyr,ot-uart ``.
53+
5054============================
5155
5256Stable API changes in this release
Original file line number Diff line number Diff line change @@ -32,6 +32,15 @@ Build the OpenThread NCP sample application like this:
3232 :goals: build
3333 :compact:
3434
35+ Build the OpenThread NCP sample application which uses CDC ACM UART device:
36+
37+ .. zephyr-app-commands ::
38+ :zephyr-app: samples/net/openthread/coprocessor
39+ :board: nrf52840dk_nrf52840
40+ :goals: build flash
41+ :gen-args: -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb-nrf-br.conf
42+ :compact:
43+
3544Example building for the nrf52840dk_nrf52840 for RCP:
3645
3746.. zephyr-app-commands ::
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 Nordic Semiconductor ASA
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ chosen {
9+ zephyr,ot-uart = &uart0;
10+ zephyr,console = &uart1;
11+ };
12+ };
Original file line number Diff line number Diff line change 11# TRI n4m BR
2- # Use UART_0 for Shell/Console
3- CONFIG_UART_SHELL_ON_DEV_NAME="UART_0"
4- CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0"
52CONFIG_SHELL_PROMPT_UART="ncp-uart:~$ "
63
7- # Use UART_1 for Co-Processor
8- #CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME="UART_1"
9-
10- # Use USB-CDC-ACM for NCP
11- CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM=y
12- CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME="CDC_ACM_0"
13-
144CONFIG_STDOUT_CONSOLE=y
155CONFIG_GPIO=y
166CONFIG_USB_DEVICE_STACK=y
Original file line number Diff line number Diff line change 11# Nordic NCP USB CDC-ACM
22
3- # Use UART_0 for Shell/Console
4- CONFIG_UART_SHELL_ON_DEV_NAME="UART_0"
5- CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0"
63CONFIG_SHELL_PROMPT_UART="ncp-uart:~$ "
74
85# Use USB-CDC-ACM for Co-Processor
9- CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM=y
10- CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME="CDC_ACM_0"
116CONFIG_USB_DEVICE_STACK=y
127CONFIG_USB_DEVICE_PRODUCT="OpenThread CoProcessor NRF"
138CONFIG_USB_CDC_ACM=y
Original file line number Diff line number Diff line change @@ -33,6 +33,3 @@ CONFIG_OPENTHREAD_BORDER_AGENT=y
3333CONFIG_OPENTHREAD_BORDER_ROUTER=y
3434CONFIG_OPENTHREAD_UDP_FORWARD=y
3535CONFIG_OPENTHREAD_ENABLE_SERVICE=y
36-
37- # Move console to other UART to not interfere with NCP
38- CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_1"
Original file line number Diff line number Diff line change 1616 platform_allow : nrf52840dk_nrf52840 nrf52833dk_nrf52833
1717 tags : ci_build
1818 extra_args : OVERLAY_CONFIG=overlay-usb-nrf-br.conf
19+ DTC_OVERLAY_FILE="usb.overlay"
1920 samples.openthread.coprocessor.rcp :
2021 build_only : true
2122 platform_allow : nrf52840dk_nrf52840 nrf52833dk_nrf52833
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 Nordic Semiconductor ASA
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ chosen {
9+ zephyr,ot-uart = &cdc_acm_uart0;
10+ };
11+ };
12+
13+ &zephyr_udc0 {
14+ cdc_acm_uart0: cdc_acm_uart0 {
15+ compatible = "zephyr,cdc-acm-uart";
16+ label = "CDC_ACM_0";
17+ };
18+ };
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ endif # LOG_BACKEND_RTT
187187
188188config LOG_BACKEND_SPINEL
189189 bool "Enable OpenThread dedicated Spinel protocol backend"
190- depends on (OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME!=UART_CONSOLE_ON_DEV_NAME || ! LOG_BACKEND_UART)
190+ depends on ! LOG_BACKEND_UART
191191 depends on NET_L2_OPENTHREAD
192192 help
193193 When enabled, backend will use OpenThread dedicated SPINEL protocol for logging.
You can’t perform that action at this time.
0 commit comments