USB
  Max speed in HID

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Max speed in HID
lieven
Member
posted November 12, 2006 11:14 PM     Click Here to See the Profile for lieven     Edit/Delete Message
Hi,

I am thinking about implementing HID in stead of USBxpress but the data rate to the device must be at least 96kbyte/s. Normally the maximum is 64. Is it possible in any way to use 2 endpoints for sending data from host to device? Can the control endpoint be 'abused' for that?

Thanks,
Lieven.

IP: Logged

Patryk
Member
posted November 13, 2006 04:16 AM     Click Here to See the Profile for Patryk     Edit/Delete Message
I'm sure Tsuneo will post here soon and provide details. But meanwhile some general info.
Control endpoint generally (it is host controller dependent) won't give more than 64kB/s. You can count on 32kB/s when you send in 128bytes packets (on any host controller), 48kB/s in 384bytes packets. So when used in addition to HID OUT endpoint it could give 96kB/s (or more) in sum.
Another way is to make composite device - with 2 HID interfaces giving you (up to) 2 OUT endpoints.

Edit: second solution gives you guaranteed bandwidth.

[This message has been edited by Patryk (edited November 13, 2006).]

IP: Logged

Tsuneo
Member
posted November 13, 2006 11:00 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
1) Control transfser
Control transfer over EP0 is not recommended for the communication exchanged regularly and frequently.

a) The transfer speed is altered depending on the host controller on the PC.
OHCI can transfer multiple stages of control transfer in a single USB frame, but UHCI takes at least a single USB frame for each stage of control transfer. That is, it takes at least three USB frame, for setup/data/status, on UHCI.

b) Control transfer handling puts considerable load to the firmware than communication over other endpoints.

2) Two HID OUT EPs
As Patryk pointed out, a composite device, HID + HID, is required to equip two OUT EPs on a single device.

Please note, the arrival order on the two OUT EPs on the device side may be reversed from the order you sent them on the application. For example, the application sends packets to EP2 and then EP1. But the device may receive EP1 first, and then EP2. If the order is important for your application, you must assign a byte on the data to show the packet number to sort them on the device side.


Anyway, it is unfortunate that there is no bulit-in class driver that supports bulk transfer with the flexibility like HID. CDC supports bulk transfer, but it is tied to virtual COM port on the PC side.

UMDF seems promising, but it is still under beta yet, and supported only on WinXP and Vista. ("USb diver in windows VISTA")

Tsuneo

[This message has been edited by Tsuneo (edited November 13, 2006).]

IP: Logged

lieven
Member
posted November 14, 2006 11:01 AM     Click Here to See the Profile for lieven     Edit/Delete Message
Thank you both for the explanations!

Lieven.

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b