boards: decawave_dwm3001cdk: remove CDC ACM configuration

This board has a built-in debug adapter that provides a serial
connection to the host. This is mentioned in the board documentation.
The SoC pins P0.15 (RX) and P0.19 (TX) are connected to the debug
adapter pins TXD and RXD, respectively. This board should not configure
any other serial connection by default.

Update the board documentation accordingly.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2024-12-17 12:54:05 +01:00 committed by Benjamin Cabé
commit d9cca5c61a
6 changed files with 47 additions and 94 deletions

View file

@ -1,12 +0,0 @@
# DecaWave DWM3001CDK board configuration
# Copyright (c) 2024 The Zephyr Project Contributors
# # SPDX-License-Identifier: Apache-2.0
if BOARD_DECAWAVE_DWM3001CDK
config BOARD_SERIAL_BACKEND_CDC_ACM
bool "Use USB CDC as serial console backend"
default y
endif # BOARD_DECAWAVE_DWM3001CDK

View file

@ -8,60 +8,4 @@ if BOARD_DECAWAVE_DWM3001CDK
config I2C config I2C
default SENSOR default SENSOR
if BOARD_SERIAL_BACKEND_CDC_ACM
config USB_DEVICE_STACK
default y
config USB_CDC_ACM
default SERIAL
config CONSOLE
default y
config UART_CONSOLE
default CONSOLE
config USB_DEVICE_INITIALIZE_AT_BOOT
default y if !MCUBOOT && CONSOLE
config SHELL_BACKEND_SERIAL_CHECK_DTR
default SHELL
depends on UART_LINE_CTRL
config UART_LINE_CTRL
default y
config USB_DEVICE_REMOTE_WAKEUP
default n
if LOG
# Logger cannot use itself to log
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
default USB_CDC_ACM_LOG_LEVEL_OFF
endchoice
# Set USB log level to error only
choice USB_DEVICE_LOG_LEVEL_CHOICE
default USB_DEVICE_LOG_LEVEL_ERR
endchoice
endif # LOG
if USB_DEVICE_STACK
# Enable UART driver, needed for CDC ACM
config SERIAL
default y
endif # USB_DEVICE_STACK
endif # BOARD_SERIAL_BACKEND_CDC_ACM
DT_CHOSEN_ZEPHYR_CONSOLE := zephyr,console
config UART_CONSOLE
default y if $(dt_chosen_enabled,$(DT_CHOSEN_ZEPHYR_CONSOLE)) && CONSOLE
endif # BOARD_DECAWAVE_DWM3001CDK endif # BOARD_DECAWAVE_DWM3001CDK

View file

@ -4,6 +4,21 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 19)>,
<NRF_PSEL(UART_RX, 0, 15)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 19)>,
<NRF_PSEL(UART_RX, 0, 15)>;
low-power-enable;
};
};
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 24)>, psels = <NRF_PSEL(TWIM_SDA, 0, 24)>,

View file

@ -14,11 +14,11 @@
compatible = "decawave,dwm3001"; compatible = "decawave,dwm3001";
chosen { chosen {
zephyr,console = &cdc_acm_uart0; zephyr,console = &uart0;
zephyr,shell-uart = &cdc_acm_uart0; zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &cdc_acm_uart0; zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &cdc_acm_uart0; zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &cdc_acm_uart0; zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition; zephyr,code-partition = &slot0_partition;
@ -84,6 +84,15 @@
status = "okay"; status = "okay";
}; };
&uart0 {
status = "okay";
compatible = "nordic,nrf-uart";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
@ -145,10 +154,6 @@
zephyr_udc0: &usbd { zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd"; compatible = "nordic,nrf-usbd";
status = "okay"; status = "okay";
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
}; };
&reg1 { &reg1 {

View file

@ -8,3 +8,10 @@ CONFIG_HW_STACK_PROTECTION=y
# Enable GPIO # Enable GPIO
CONFIG_GPIO=y CONFIG_GPIO=y
# Enable UART controller
CONFIG_SERIAL=y
# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

View file

@ -31,30 +31,24 @@ found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details). :ref:`application_run` for more details).
There are two USB ports, the one farthest from the DWM3001C is connected to the Here is an example for the :zephyr:code-sample:`hello_world` application.
J-Link debugger and the closer one is connected to the nRF52833, though you need
to use CDC ACM USB to get output over it
Here is an example for the :zephyr:code-sample:`usb-cdc-acm` application. Connect to the bottom micro-USB port labeled as J-Link and run your favorite
terminal program to listen for console output.
Connect to the bottom USB port, and flash the sample
.. zephyr-app-commands::
:zephyr-app: samples/subsys/usb/console
:board: decawave_dwm3001cdk
:goals: build flash
Then, connect the top USB port and open run your favorite terminal program to
listen for output.
.. code-block:: console .. code-block:: console
$ minicom -D <tty_device> -b 115200 $ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the board nRF52 DK Replace :code:`<tty_device>` with the port where the DWM3001CDK board can be
can be found. For example, under Linux, :code:`/dev/ttyACM0`. found. For example, under Linux, :code:`/dev/ttyACM0`.
Then build and flash the application in the usual way.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: decawave_dwm3001cdk
:goals: build flash
References References
********** **********