PROBLEM sendING large stream of data using MCF51jm128 USB.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PROBLEM sendING large stream of data using MCF51jm128 USB.

919件の閲覧回数
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,

ラベル(1)
0 件の賞賛
3 返答(返信)

745件の閲覧回数
JimDon
Senior Contributor III

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

0 件の賞賛

745件の閲覧回数
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 件の賞賛

745件の閲覧回数
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.