<?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 packets loss</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68177/usb-packets-loss</link><description>Hi, 
 I am using the latest SDK, with the nRF52840. 
 using the usbd_ble_uart example. 
 
 Created a timer that starts to send packets to the PC throw USB with a running index, the timer sends a packet every 25ms ( in 40 Hz), every packet size is 5000</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Nov 2020 14:47:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68177/usb-packets-loss" /><item><title>RE: USB packets loss</title><link>https://devzone.nordicsemi.com/thread/280150?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 14:47:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b4977b3-e3e6-4923-87e4-6107453938f8</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi JK&lt;/p&gt;
&lt;p&gt;Is there any chance the&amp;nbsp;&lt;span&gt;app_usbd_cdc_acm_write() function will return an error for such a long time that the timer triggers the sending of a new packet before you have time to send the old one?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In case this happens, do you have some method to buffer the new packet in the application, allowing you to finish sending the old one before you get on to the new data?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;br /&gt;Torbjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB packets loss</title><link>https://devzone.nordicsemi.com/thread/280014?ContentTypeID=1</link><pubDate>Sun, 15 Nov 2020 09:28:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83725b1d-7b31-4ff6-ad41-5059b95860c7</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;And thank you for your reply.&lt;/p&gt;
&lt;p&gt;I am doing the same as before but the I added a while where if the return value from the function&amp;nbsp;app_usbd_cdc_acm_write() is not NRF_SUCCESS it will be called again.&lt;/p&gt;
&lt;p&gt;I am having no losses anymore, but I got the packets not in the same order as I sent them !&lt;/p&gt;
&lt;p&gt;Can you help with that please, why The USB driver send my packets in another order and not as I sent them !?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB packets loss</title><link>https://devzone.nordicsemi.com/thread/279325?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 15:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1ff367a-a16a-4891-b0b6-ac4b41bcad6b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you check the return value of the&amp;nbsp;app_usbd_cdc_acm_write(..) function to see if it ever returns an error?&lt;/p&gt;
&lt;p&gt;When sending data over a USB BULK endpoint there is always a chance that data could be delayed, and in this case you would need to delay the transmission of data until the USB interface has time to catch up.&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>