<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>I am not able to add the cdc_acm in my application (board= nrf52840)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121972/i-am-not-able-to-add-the-cdc_acm-in-my-application-board-nrf52840</link><description>first i change to my kconfig file add this 
 
 source &amp;quot;samples/subsys/usb/common/Kconfig.sample_usbd&amp;quot; 
 
 source &amp;quot;Kconfig.zephyr 
 
 second I add to cmakelits 
 
 include ( ${ZEPHYR_BASE} /samples/subsys/usb/common/common.cmake) 
 third i add there usb_next_prj</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Jun 2025 11:49:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121972/i-am-not-able-to-add-the-cdc_acm-in-my-application-board-nrf52840" /><item><title>RE: I am not able to add the cdc_acm in my application (board= nrf52840)</title><link>https://devzone.nordicsemi.com/thread/537860?ContentTypeID=1</link><pubDate>Tue, 03 Jun 2025 11:49:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d71d098-5b1f-4613-b000-065299308aa8</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which version of the nRF Connect SDK are you using?&lt;/p&gt;
&lt;p&gt;Your example works when I test it on the nRF52840 DK with v3.0.0.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1748950226959v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Please note that by default, the USB CDC ACM on the DK is the nRF USB, and not the UART routed through the interface MCU, so you must connect the USB cable to the nRF USB connector:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" title="" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1748950391628v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Here is everything you need to add for USB CDC ACM in a project:&lt;/p&gt;
&lt;p&gt;Devicetree overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		// What to have here depends on what you will use cdc_acm_uart for
		// Here are some examples:
		
		// zephyr,shell-uart = &amp;amp;cdc_acm_uart0;
		// zephyr,console = &amp;amp;cdc_acm_uart0;
	};
};

&amp;amp;zephyr_udc0 {
	cdc_acm_uart0: cdc_acm_uart0 {
		compatible = &amp;quot;zephyr,cdc-acm-uart&amp;quot;;
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_USB_CDC_ACM=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_REMOTE_WAKEUP=n
CONFIG_USB_DEVICE_PRODUCT=&amp;quot;My USB product&amp;quot;
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x0000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;main.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr/usb/usb_device.h&amp;gt;

...

int ret;
ret = usb_enable(NULL);
if (ret != 0 &amp;amp;&amp;amp; ret != -EALREADY) {
	return 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have attached a project where I have added USB CDC ACM support to Zephyr&amp;#39;s Hello World to show how to add support for this easily.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/usb_5F00_cdc_5F00_acm_5F00_hello_5F00_world.zip"&gt;devzone.nordicsemi.com/.../usb_5F00_cdc_5F00_acm_5F00_hello_5F00_world.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>