I noticing a weird behaviour with my configuration, that I am writing for a NRF52840 USB Dongle. Every time I enable the internal pull-up on my i2c0, the USB cdc_acm_uart0 does not output anything anymore. The USB device still shows up, but there is no output. If I remove the pull-up line from my configuration it works as expected.
-- Zephyr version: 3.2.99 (/opt/nordic/ncs/v2.2.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf52840dongle_nrf52840
-- Found host-tools: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
Important parts of my overlay file:
&i2c0 {
status = "okay";
temp1: tmp116@48 {
compatible = "ti,tmp116";
reg = < 0x48 >;
status = "okay";
};
};
&i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 20)>,
<NRF_PSEL(TWIM_SCL, 0, 24)>;
bias-pull-up; // This line breaks it
};
};
&i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 20)>,
<NRF_PSEL(TWIM_SCL, 0, 24)>;
low-power-enable;
};
};
&uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 11)>,
<NRF_PSEL(UART_RTS, 0, 4)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 14)>,
<NRF_PSEL(UART_CTS, 0, 26)>;
bias-pull-up;
};
};
&uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 11)>,
<NRF_PSEL(UART_RX, 0, 14)>,
<NRF_PSEL(UART_RTS, 0, 4)>,
<NRF_PSEL(UART_CTS, 0, 26)>;
low-power-enable;
};
};
&pinctrl {
/delete-node/ i2c1_default;
/delete-node/ i2c1_sleep;
/delete-node/ spi0_default;
/delete-node/ spi0_sleep;
/delete-node/ spi1_default;
/delete-node/ spi1_sleep;
};
/ {
chosen {
zephyr,console = &cdc_acm_uart0;
zephyr,shell-uart = &cdc_acm_uart0;
zephyr,uart-mcumgr = &cdc_acm_uart0;
zephyr,bt-mon-uart = &cdc_acm_uart0;
zephyr,bt-c2h-uart = &cdc_acm_uart0;
};
};
&i2c1 {
/delete-property/ pinctrl-0;
/delete-property/ pinctrl-1;
/delete-property/ pinctrl-names;
status = "disabled";
};
&spi0 {
/delete-property/ pinctrl-0;
/delete-property/ pinctrl-1;
/delete-property/ pinctrl-names;
status = "disabled";
};
&spi1 {
/delete-property/ pinctrl-0;
/delete-property/ pinctrl-1;
/delete-property/ pinctrl-names;
status = "disabled";
};
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
current-speed = < 115200 >;
status = "okay";
};
};
Important parts of my prf.conf:
CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_LINE_CTRL=y CONFIG_STDOUT_CONSOLE=y CONFIG_LOG=y CONFIG_LOG_BACKEND_UART=y