Page 1 of 1

Bandwith why do we get more than 80 KByte/s...

Posted: Tue Sep 02, 2008 2:16 am
by tkrieger
Hi,

i am a newbie and got some questions. hoply someone can answer here. If i take a look into "usb in a nutshell"

http://www.beyondlogic.org/usbnutshell/usb4.htm

I see that there is no
- bulk transfer
- interrupt transfer
- isochronus transfer
for low speed devices. but i have seen them in the CDC project with bulk transfers. is here a lack of specification.

if i see that the control transfer allow a max of 8 bytes per transfer and we set an minimum poll of 10 ms on usbconfig.h i get an transferrate of 800 Bytes per Second. Ok i got more in the tests but i hope you know what i try to say.

how can i get bulk transfers for low speed vendor specific devices with more packet size? i am a little confused.

best greetings

tkrieger

Re: Bandwith why do we get more than 80 KByte/s...

Posted: Tue Sep 09, 2008 8:56 am
by henni
> I see that there is no
> - bulk transfer
> - interrupt transfer
> - isochronus transfer
> for low speed devices.
USB spec. allows one interrupt pipe on low-speed devices, at least for IN direction (device->host), AFAIK nothing else.

> ... i have seen BULK in the CDC project ...
Windows does not prevent using BULK on low-speed devices (as BULK and INTERRUPT are very similar).
Therefore, AVR-CDC (and my USB2LPT) will run too.
BULK transfers occupy less bandwith than SETUP transfers.

> ... poll of 10 ms ... i get an transferrate of 800 Bytes per Second.
Right for interrupt transfers. For bulk, maximum is 8 kByte/s. You may achieve more kByte/s by using more pipes, but IMHO the AVR cannot handle much more data while processing power is mostly claimed by heavy AVRUSB traffic.

> (how) can i get bulk transfers for low speed ... with more packet size?
This is forbidden by USB spec. I don't know whether Windows supports deeper low-speed FIFOs.

Re: Bandwith why do we get more than 80 KByte/s...

Posted: Sun Sep 14, 2008 1:41 am
by poke
henni wrote:> I see that there is no
> - bulk transfer
> - interrupt transfer
> - isochronus transfer
> for low speed devices.
USB spec. allows one interrupt pipe on low-speed devices, at least for IN direction (device->host), AFAIK nothing else.


Actually low-speed devices can use only control and interrupt transfers but not the other two. Every device must have endpoint 0 IN+OUT and use control transfers for it. Also there is a limit (which I donot know) on how many endpoints a low-speed device can use.

henni wrote:>> ... i have seen BULK in the CDC project ...
Windows does not prevent using BULK on low-speed devices (as BULK and INTERRUPT are very similar).
Therefore, AVR-CDC (and my USB2LPT) will run too.
BULK transfers occupy less bandwith than SETUP transfers.


USB Specification does not allow bulk and interrupt trasfers for low-speed, but it is technically possible for device to declare it. Windows XP and earlier and Mac OS X do not enforce the requirement. Windows Vista does. Linux (since 2.6.24 I think) does not enforce the rule.

henni wrote:>> ... poll of 10 ms ... i get an transferrate of 800 Bytes per Second.
Right for interrupt transfers. For bulk, maximum is 8 kByte/s. You may achieve more kByte/s by using more pipes, but IMHO the AVR cannot handle much more data while processing power is mostly claimed by heavy AVRUSB traffic.


I think that only frame reception and transmission are CPU demanding. Since the implementation uses only part of 1.5Mb/s bandwidth, I assume only part of the CPU time is critical. The limiting thing that you can not disable IT0 interrupt.

henni wrote:>> (how) can i get bulk transfers for low speed ... with more packet size?
This is forbidden by USB spec. I don't know whether Windows supports deeper low-speed FIFOs.


USB Specs forbid this so this would work by pure chance.