<?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>USB CDC ACM Understanding bulk writes.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69793/usb-cdc-acm-understanding-bulk-writes</link><description>Hi All, 
 Using SDK15.3, NRF52840 USB Dongle. 
 After a few experiments I would like to clarify my understanding on how the usb bulk write works. 
 I am currently writting packets of ~ 250 bytes at a given frequency to the VCP on windows 10. 
 If I write</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jan 2021 11:02:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69793/usb-cdc-acm-understanding-bulk-writes" /><item><title>RE: USB CDC ACM Understanding bulk writes.</title><link>https://devzone.nordicsemi.com/thread/287923?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 11:02:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cabea31-1564-4531-8a54-31018e56676a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Felipe&lt;/p&gt;
&lt;p&gt;It is unlikely that reducing the endpoint size will change the latency, as the latency is primarily set by the poll interval of the host (1 millisecond).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to reduce the endpoint size for a specific endpoint you would have to change the value provided to the&amp;nbsp;nrfx_usbd_ep_max_packet_size_set() function called by nrfx_usbd_init() in nrfx_usbd.c.&amp;nbsp;&lt;br /&gt;By default this will be set to NRFX_USBD_EPSIZE for any endpoint that is not a ISO endpoint, but you can change this to some other number.&amp;nbsp;&lt;br /&gt;Please note that this involves changing the USB driver itself, and it is not something we have tested, so there might be unintended side effects or issues by making this change.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Based on my discussion with the USB developer the bulk write behavior you see is most likely caused by&amp;nbsp;how the data is handled on the host side, and not how it is sent.&amp;nbsp;If you are able to sniff the USB communication itself you should see that the data is sent more or less every 10 milliseconds.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Understanding bulk writes.</title><link>https://devzone.nordicsemi.com/thread/287428?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2021 09:13:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0135da19-6b0a-4931-9dca-074353a7fb22</guid><dc:creator>  Curiosus</dc:creator><description>&lt;p&gt;Hi Ovrebekk,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jus following up on this thread.&amp;nbsp;&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/69793/usb-cdc-acm-understanding-bulk-writes/286809#286809"]I strongly doubt there is any way to change this. If possible I would look into making the application robust against this write behavior (bulk data transfers are not designed for applications requiring constant latency or throughput, bulk only guarantees that no data is lost or corrupted).&amp;nbsp;[/quote]
&lt;p&gt;Is there any way to reduce the bulk size or force it to be a constant value in order to reduce latency ?&lt;/p&gt;
&lt;p&gt;If so, is this done in the USB device as such or would it be configurable in the USB Host side ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for looking into this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Understanding bulk writes.</title><link>https://devzone.nordicsemi.com/thread/286809?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 09:51:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8280d26-14b7-4fbe-b2bd-1f85aa652cca</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Felipe&lt;/p&gt;
&lt;p&gt;Sorry for the slow response. I expect there is some buffering happening under the hood that makes the data stream more continuous as you increase the throughput, but I need to discuss this with our USB developer when he is back over the new year.&amp;nbsp;&lt;/p&gt;
[quote user=""]Is there any way to avoid this bulk write behavior ?[/quote]
&lt;p&gt;I strongly doubt there is any way to change this. If possible I would look into making the application robust against this write behavior (bulk data transfers are not designed for applications requiring constant latency or throughput, bulk only guarantees that no data is lost or corrupted).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>