This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USBD CDC ACM 64 Byte Limit

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). 

I would like to to support 256 byte buffer read and writes. Can I just ignore the defines and write more data (ie. up to 256 bytes)? 

Do I need to change any defines to support larger read/writes?

If it matters, I am using nRF52840 and SDK 15.3 with S140.

Thanks in advance.

Mark J

Parents Reply Children
  • 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.

    Actual comms behavior was strange. When sending 256 byte msgs, most would get through - except the last msg.

    Msging appears ok now that I have reduce app msgs to 64 bytes or less.

  • Smells like you missed the chapter in the USB spec how usb bulk transactions work.

    Integer multiples of MaxPacketSize (64) need a zero packet in order to properly signal the transaction end back to the host stack.

Related