<?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 ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62663/usbd-cdc-acm-64-byte-limit</link><description>Hi, 
 I have a simple question ... I think. 
 I have been limiting my USBD reads/writes to 64 bytes as NRFX_USBD_EPSIZE and NRF_DRV_USBD_EPSIZE are set to 64 bytes. I have read that the CDC ACM standard supports larger packet sizes (I recall up to 1024</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 02 Nov 2024 09:33:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62663/usbd-cdc-acm-64-byte-limit" /><item><title>RE: USBD CDC ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/thread/508866?ContentTypeID=1</link><pubDate>Sat, 02 Nov 2024 09:33:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4eabeb8c-885e-4419-9a92-edc1cf7f7b24</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Smells like you missed the chapter in the USB spec how usb bulk &lt;em&gt;transactions&lt;/em&gt; work.&lt;/p&gt;
&lt;p&gt;Integer multiples of MaxPacketSize (64) need a zero packet in order to properly signal the transaction end back to the host stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/thread/508860?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2024 21:16:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e744753a-87ba-4760-a4f8-4333ebc4db77</guid><dc:creator>Mark J</dc:creator><description>&lt;p&gt;Well - its been a beat. Our host device (our IoT Gateway) evolved and now supports a newer version of Debian (now 11, was 10). The CDC ACM driver in our host is not handling any writes larger than 64 bytes. So - always use less than 64 bytes to be safe and do not rely on the driver handling multiple 64 byte messages.&lt;/p&gt;
&lt;p&gt;Actual comms behavior was strange. When sending 256 byte msgs, most would get through - except the last msg.&lt;/p&gt;
&lt;p&gt;Msging appears ok now that I have reduce app msgs to 64 bytes or less.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/thread/255365?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 21:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbbb5b52-a06e-4549-ad2f-c3d834e78263</guid><dc:creator>Mark J</dc:creator><description>&lt;p&gt;Yes, understood. I think the practical point is that you can send more 64 bytes through the Nordic USBD api write call - you do not have to explicitly break msgs into 64 byte (or less) parts.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/thread/255364?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 21:45:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5132349d-927e-494e-8e89-8afaf7b9fc04</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Careful: USB on the &lt;em&gt;host &lt;/em&gt;works a lot different than on the NRF &amp;micro;C.&lt;/p&gt;
&lt;p&gt;The host will assemble a large transaction from smaller 64 byte packets (as mandated by USB spec) - this works for both IN and OUT bulk endpoints.&lt;/p&gt;
&lt;p&gt;The NRF USB peripherial has a hard 64 byte limit for bulk ep EasyDMA. The CDC API can work around this limit IIRC by splitting larger transactions into 64 byte packets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/thread/255361?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 20:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aca67e6-d899-4fb9-9b6e-e66f378d1146</guid><dc:creator>Mark J</dc:creator><description>&lt;p&gt;I have empirically tested and determined that I can send more than 64 bytes. When receiving on a Linux host, I am getting up to 128 byte messages. So, if I send 160 bytes over USBD, I receive a msg with 128 bytes followed by another with 32 bytes.&lt;/p&gt;
&lt;p&gt;I suspect that the 128 byte limit may be a Linux CDC driver threshold for reads and may not have anything to do with the Nordic USBD driver.&lt;/p&gt;
&lt;p&gt;Mark J&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/thread/255338?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 16:04:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f513f10f-14a7-43a1-97bb-8d4f280e2db3</guid><dc:creator>Mark J</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/turboj"&gt;Turbo J&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I can see the distinction now.&lt;/p&gt;
&lt;p&gt;If I write more than 64 bytes (for example), does the USBD driver support breakup into 64 byte packets - or do I need to breakup larger messages myself? There are no clearly defined message limits within Nordic docs.&lt;/p&gt;
&lt;p&gt;I can test, but the answer to this question should be referenceable.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Mark J&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC ACM 64 Byte Limit</title><link>https://devzone.nordicsemi.com/thread/255332?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 15:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aa732b0-2696-4587-805c-e1e51743a0a1</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="9153" url="~/f/nordic-q-a/62663/usbd-cdc-acm-64-byte-limit"]I have read that the CDC ACM standard supports larger packet sizes (I recall up to 1024).&amp;nbsp;[/quote]
&lt;p&gt;Not for USB 2.0 Full speed connections. USB 2.0 full speed only supports 64 data bytes / packet for bulk endpoints, and that is also the easydma limit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>