How to approach to solve the problem about irq multiple registrations?

I want to set serial communication over USB and try to implement CDC ACM functions on nrf52840dk-nrf52840.


prj.conf:

CONFIG_GPIO=y

CONFIG_ADC=y

CONFIG_CONSOLE=y

# Enable the UART driver
CONFIG_SERIAL=y

CONFIG_UART_ASYNC_API=y
CONFIG_UART_LINE_CTRL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_CDC_ACM=y
CONFIG_USB_DEVICE_REMOTE_WAKEUP=n

# USB Product ID
CONFIG_USB_DEVICE_PID=0x0001

CONFIG_NRFX_UARTE0=n
# CONFIG_UART_NRFX=y

# USB Device Controller
CONFIG_UDC_DRIVER=y

.overlay:

// To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.

// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:

// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels

// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/guides/ncs_configure_app.html#devicetree-support-in-the-extension


/ {
	zephyr,user {
		io-channels = <&adc 0>;
	};
};
&adc {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	channel@0 {
		reg = <0>;
		zephyr,gain = "ADC_GAIN_1";
		zephyr,reference = "ADC_REF_VDD_1";
		zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
		zephyr,input-positive = <NRF_SAADC_AIN5>;
		zephyr,resolution = <14>;
	};
};

&gpio0 {
	status = "okay";
};

&uart1 {
    status = "okay";
    current-speed = <115200>;
	pinctrl-0 = <&uart1_default>;
	pinctrl-1 = <&uart1_sleep>;
	pinctrl-names = "default", "sleep";
};

&pinctrl {
	/* I2C  SDA: P0.26, SCL: P0.27  nRF52-DK */
	/* I2C  SDA: P0.06, SCL: P0.08  FingerHR_01 */

	uart1_default: uart1_default {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 24)>,
				    <NRF_PSEL(UART_RX, 0, 25)>;
		};
	};

	uart1_sleep: uart1_sleep {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 24)>,
				    <NRF_PSEL(UART_RX, 0, 25)>;
			low-power-enable;
		};
	};
};

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


But now, build on NCS v2.7.0 stops with the following error:

gen_isr_tables.py: error: multiple registrations at table_index 39 for irq 39 (0x27)
Existing handler 0x9d6d, new handler 0x9d6d
Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the same irq multiple times?

ninja: build stopped: subcommand failed.

I understand the irq39 is used by usbd defined in nrf52840.dtsi.
But I cannot find where the multiple definition was happened.

Similar problems are found on this DevZone, but any posts do not tell me the answer for my issue.
Please tell me how to approach to solve the problem about irq multiple registrations?

Parents Reply Children
Related