<?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>&amp;quot;usb_cdc_acm: Ring buffer full, drain buffer&amp;quot; repeats on boot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98777/usb_cdc_acm-ring-buffer-full-drain-buffer-repeats-on-boot</link><description>I&amp;#39;m developing code for the xiao_ble board in nRF Connect using Visual Studio, currently working with the ble light_switch example. I&amp;#39;m using the logger module rather than eg printk() as for whatever reason printk() doesn&amp;#39;t come through the USB connector</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Apr 2023 13:59:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98777/usb_cdc_acm-ring-buffer-full-drain-buffer-repeats-on-boot" /><item><title>RE: "usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot</title><link>https://devzone.nordicsemi.com/thread/422553?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2023 13:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f19a6b85-95b9-429b-8153-632069658158</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It highly depends on which modules are enabled in your firmware, and the level of the logger module.&lt;/p&gt;
&lt;p&gt;Informational logs can fill up the log queue quite quickly, especially when the backend isn&amp;#39;t yet ready.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot</title><link>https://devzone.nordicsemi.com/thread/422382?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2023 21:47:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6582ee1b-4639-4d99-b9a2-e8f935ecbfdd</guid><dc:creator>ZacMid007</dc:creator><description>&lt;p&gt;Other log messages do indeed appear once the port is open, I&amp;#39;m just confused as to why so many strings seem to be attempted to print at boot, as I am not logging anything and cannot see where in the code that volume of messages could be coming from&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot</title><link>https://devzone.nordicsemi.com/thread/421231?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2023 10:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aab494a0-2ce8-4268-9a1b-7c90e7b925f0</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ZacMid007"]&lt;p&gt;However, going back to the light_switch example and changing the ring buf size to 4096, now I see this on boot (but not every time, maybe 1 in 3 times when I boot the device):&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Good to hear that the issue is improving.&lt;/p&gt;
&lt;p&gt;&amp;quot;device not ready&amp;quot; means that the port hasn&amp;#39;t been opened from the PC yet. The logger module will buffer a given amount of strings, which is the reason why you&amp;#39;re getting those error prints when it finally has opened up the port. Other log messages should appear, and if you want printk to be processed&amp;nbsp;by the log module, you can set &amp;quot;CONFIG_LOG_PRINTK=y&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot</title><link>https://devzone.nordicsemi.com/thread/421122?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 21:35:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33a7cdce-91ae-44c3-b8ab-7dd06ec3f2ee</guid><dc:creator>ZacMid007</dc:creator><description>&lt;p&gt;If I don&amp;#39;t use any other log statements, that screenshot is all that appears on the interface, yes. I tried another example, the mesh chat one, and do not see the same thing:&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/pastedimage1681853636070v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;However, going back to the light_switch example and changing the ring buf size to 4096, now I see this on boot (but not every time, maybe 1 in 3 times when I boot the device):&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/pastedimage1681853711743v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot</title><link>https://devzone.nordicsemi.com/thread/421064?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 13:45:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3007637-b396-4a9f-8728-221617054fbd</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The board &amp;quot;xiao_ble&amp;quot; will by default use USB CDC_ACM for logging and printing on console:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.2.99-ncs2/boards/arm/xiao_ble/xiao_ble.dts#L18-L22"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.2.99-ncs2/boards/arm/xiao_ble/xiao_ble.dts#L18-L22&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What you can do is to try to adjust the ring buf size:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_USB_CDC_ACM_RINGBUF_SIZE=4096&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you get anything else at all on your log interface, or is this the only thing that is printed? Do you see this with other samples, or only the bluetooht/mesh/light_switch sample?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot</title><link>https://devzone.nordicsemi.com/thread/420870?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 22:00:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5eca0ca-b4b8-408f-b4d1-5bd74fe3fd73</guid><dc:creator>ZacMid007</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not sending any data (the issue persists even when all print/log statements are removed), nor did I include the CDC_ACM module; whatever this is, it&amp;#39;s occurring by default within the nrf/samples/bluetooth/mesh/light_switch example&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot</title><link>https://devzone.nordicsemi.com/thread/420822?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 14:27:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c99bb884-9158-4fee-9fc6-d2f24ec838ba</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you sending and receiving alot of data when this happens?&lt;/p&gt;
&lt;p&gt;Can you share a bit more information on how you&amp;#39;re using the CDC_ACM module? for instance your event_handler.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>