PROBLEM sendING large stream of data using MCF51jm128 USB.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PROBLEM sendING large stream of data using MCF51jm128 USB.

867 Views
Ahmedahmed
Contributor II

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

 

calls.

the problem is the buffer is overwitten. Did any one manage to handle this issue?

Kind regards,

Labels (1)
0 Kudos
3 Replies

693 Views
JimDon
Senior Contributor III

you need to wait until the data read by the host before sending the next.

0 Kudos

693 Views
Ahmedahmed
Contributor II


Hi Jim,

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

0 Kudos

693 Views
JimDon
Senior Contributor III

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.