Hi there,
Try to reproduce the error by sending a packet of bytes whose length is a multiple of 64 bytes using USBD_CDC_SetTxBuffer/USBD_CDC_TransmitPacket functions.
The maximum packet length for full-speed USB communication is 64 bytes. So the data will be transferred in chunks of 64 bytes and needs to be reassembled on the other end.
USB CDC is based on bulk transfer endpoints and implements a data stream (also known as pipe), not a message stream. It's basically a stream of bytes. So if you send 200 bytes, do not expect any indication of where the 200 bytes end. Such information is not transmitted.
https://github.com/STMicroelectronics/STM32CubeF3/issues/2
-------------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer–