<?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>USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83386/usbd-cdc-establishing-connection-has-huge-latency</link><description>Hi, 
 I have implemented the USBD CDC ACM driver into my firmware. What stands out is the latency as soon as the event 
 APP_USBD_CDC_ACM_USER_EVT_PORT_OPEN triggers, my terminal emulator takes some time to actually establish the connection (i.e. until</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Feb 2022 18:40:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83386/usbd-cdc-establishing-connection-has-huge-latency" /><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/351206?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 18:40:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:112b4816-ceb2-4659-9112-7f29d25e4dac</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I found somewhat of a solution or rather the inhibitory factor.&lt;/p&gt;
&lt;p&gt;CDC will apparently stall after suspending and resuming&amp;nbsp;the port if there&amp;#39;s no continuous stream of data being written (at least in the beginning)&lt;/p&gt;
&lt;p&gt;I put a for loop at the end of the initialisation which just sends a hundred empty strings over USB which leads to just milliseconds before my computer and other devices recognize the device as such.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;connecting itself is similar. in my main state machine I have a case that says as long as Im not connected, send an empty string once in a while.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is obviously kind of a dirty solution but since it doesn&amp;#39;t interfere with business logic Ill leave it like this for now&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/347119?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 10:22:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d485eedf-630f-4bd0-8e43-f6a910913c61</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;id say around 20 seconds.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think the firmware is doing fine so no delays in there, something must be up with the physical connection or maybe its on my mac?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/347116?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 10:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9bac9cb-6d31-445d-922e-ebefb15de11f</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello again,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;How long does it take to establish the connection? Did you try with a clean CDC example from e.g. nRF5 SDK v17.1.0? What is your firmware doing at the time it is trying to connect?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/346691?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 11:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5859f9c2-0a07-4a62-8412-0b7bc71d932c</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;No the startup time is still way too long!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/346677?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 11:28:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23ae864b-3caa-4794-b30a-d48c7266e3eb</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Does this mean that you have resolved this ticket?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/346676?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 11:26:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438a3503-330a-47df-a1f6-41e6e95dae22</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;sorry, fyi the softreset was my own fault, I called system_power_off() at one point&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/346661?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 10:42:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe1dce55-b760-4986-be42-dc3018aafba5</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;the existing project is my own, but I used the pre existing CDC example and embedded it into my own firmware!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;SDK 15.3.0&lt;/p&gt;
&lt;p&gt;also do you know If the CDC module make a softreset happen from time to time? I noticed that my uC just randomly restarts after a minute passes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/346657?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 10:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddda55eb-8cb3-4e97-b95d-f260900e01f1</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Please provide more/relevant information on what SDK version you are working on.&lt;/p&gt;
&lt;p&gt;Is this existing project your own or a sample from the SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/346649?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 10:20:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3beb29c3-0c61-43a1-bc25-607c51ae4961</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;So Im not using the connect sdk and Im also not using Zephyr. I implemented CDC in an existing project that works with radar data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the reply&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC establishing connection has huge latency</title><link>https://devzone.nordicsemi.com/thread/346471?ContentTypeID=1</link><pubDate>Thu, 06 Jan 2022 12:42:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2435c90f-a67c-4fa5-87e0-fe716e5713b4</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From your previous ticket no 281204&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Which version of the nRF Connect SDK are you using?&lt;/p&gt;
&lt;p&gt;Have you checked out the standard cdc_acm sample in Zephyr?&lt;/p&gt;
&lt;p&gt;If you look at the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1-branch/samples/subsys/usb/cdc_acm/prj.conf"&gt;project configuration file&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1-branch/samples/subsys/usb/cdc_acm/src/main.c"&gt;main file&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;you can usually get a good overview of which configuration settings and init code you need to use a specific feature, and you can copy paste it into your own project.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just be aware that some of the config might be set already, and you should avoid duplication.&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>