cancel
Showing results for 
Search instead for 
Did you mean: 

ST Virtual COM example. What is the speed of data transfer via USB?

morpeh89
Associate II
Posted on February 16, 2011 at 14:52

ST Virtual COM example. What is the speed of data transfer via USB?

11 REPLIES 11
ColdWeather
Senior
Posted on May 17, 2011 at 14:25

Watch descriptors: maybe you connected at 1.5Mbps (low speed USB).

Also see doc

http://www.13thmonkey.org/documentation/USB/resistor_ecn.pdf

, page 3.

Posted on May 17, 2011 at 14:25

Hi,

for ColdWheater:

If

I remember correctly

Virtual COM is not possible with a low-speed USB device because it does not have bulk endpoint (used by CDC driver).

Max Speed of Virtual COM = 640 Kbits/s = 80 Kbytes/s

I hope

this helps

Paolo

ColdWeather
Senior
Posted on May 17, 2011 at 14:25

@Paolo:

The author of the topic seems to have his own board design. The question is, what happens, if 1.5K is applied to D- instead of D+ USB line?

Posted on May 17, 2011 at 14:25

Andrew Neil
Chief II
Posted on May 17, 2011 at 14:25

''Max Speed of Virtual COM = 640 Kbits/s''

 

 

Where does that figure come from?

Is it inherent in the USB specs, or is it a specific limiation of this particular ST implementation?
Posted on May 17, 2011 at 14:25

tsuneo
Senior
Posted on May 17, 2011 at 14:25

ferrari.paolo.001

> The limit is in the Windows CDC drivers.

Huh?

Are you talking about old Windows versions?

For XP and later, at least, such a limit doesn't exist.

You'll see more than 1 MBytes/sec on full-speed bus over usbser.sys.

otachkin.alexey

> while(!UsbCDCWrite(Buffer,63)); - in infinite loop.

You are sending just 63 bytes transfer (short packet).

It's the reason why you can't get more transfer speed.

Keep full-size packet (64 bytes) to get greater transfer size.

And then, you get more transfer speed.

It is the principle of bulk transfer.

Please note,

For the CDC bulk IN, the transfer should always terminate with short packet (including Zero-Length Packet). For usbser.sys, I recommend you to terminate the transfer size in less than 4K bytes.

Tsuneo

antonio239955
Associate II
Posted on May 17, 2011 at 14:25

Hi! I would like to ask the people here for a different problem. I ha ve the example (CDC usb ) working satisfactorily and check it with Hyperterminal. However it happens that the transfer from the micro to pc does not happen when the buffer is ''exactly'' filled with a multiple of 64 bytes. Or more exactly this happens at 128 bytes certainly. Is this something known? If the micro sends one more byte or one less the transmission is succesfull, if it is exactly 128 the buffer seems to sit there in the PC until a new character is added and only at that point the whole is received on the hyperterminal screen. Can somebody help with this particular case? The example is CDC example from IAR. Thanks in advance for any clue !

Andrew Neil
Chief II
Posted on May 17, 2011 at 14:25

''I would like to ask the people here for a different problem''

If it's a different problem, then don't hijack the thread - start a new  thread.

You can always give a link to this thread if you think it helps...