I am using FS USB 4.1.1, i want to send large stream of data. by calling multiple USB_Class_CDC_Interface_DIC_Send_Data()
the problem is the buffer is overwitten. Did any one manage to handle this issue?
you need to wait until the data read by the host before sending the next.
Thanks for your response.
On the PC side, i reguested 8192 you expect.
from the device side I send two 4096 packets using USB_Class_CDC_Interface_DIC_Send_Data(). if I use different buffers i mangeged to recieve them but becuase of RAM limittaion I just want to use one 4096 buffer and call the USB_Class_CDC_Interface_DIC_Send_Data() twice.
What is the maximum bit rate for USB
There's no need to use a buffer that large. As I said the second time you called with the same buffer the data will be overwritten.
You will never get close to 200 K bytes per second. At best you might get 128k Which is 2 64 Byte packets Each poll. a slow MCU like the jm Cannot keep up much faster than that.
Use two smaller buffers.
Retrieving data ...