We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, Don't know if it is proper to post here.
Currently I'm on a project with USB HID function. The function works well without any error except that the USB HID has speed vary issue. The speed will vary depending on host PCs.
Using USB View, I found that for fast speed, the device has been assigned to be controlled by USB2 Enhanced Host Controller(EHC) Full Bus Speed, however, for slow speed, the device has been assigned to be controlled by USB Universal Host Controller(UHC) Full Bus Speed(Same Hardware&Firmware).
The confusing thing is what makes the host controller decides that the device should be assigned to be controlled by EHC or UHC.
Any idea and suggestions for this issue?
Thanks.
Hi, yes, EHCI is for high speed. But some hosts assign the HID device(Full Speed) to be controlled by EHC(the hosts have both EHC&UHC as shown in USB View) while some hosts assign the device to be controlled by UHC. Confusing..
Generally EHCI can only handle high-speed devices while companion controller OHCI or UCHI can only handle full/low speed devices this of course applies for a single root HUB, of course your PC can have more root HUB which have their own collection of controllers.
Full-/low-speed devices are assigned to an EHCI host controller over an (external) hub, using Transaction Translator (TT) on the hub. In this case, you may see quicker control transfer. TT, like OHCI, can execute two or more stages of control transfer in single 1ms frame. Over UHCI, each stage takes each frame.
Tsuneo
Thanks, Tsuneo,
Exactly as what you said, the Full Speed USB HID device is assigned to UHCI when the device is directly connected to the Host with Intel USB Host Controller, If the device is connected to the Host through a USB2.0 Hub, the host interface with the USB hub using EHCI, using Transaction Translator, the speed is fast. For OHCI, several PCs have been tested, the transfer speed is as fast as the EHCI.
So the end result is: For Host with Intel USB Host Controller, if the device is directly connected to the PC, the Speed will be slow; if the device is connected to the host through a USB2.0 Hub, the speed will be fast. For Host With Open Host Controller, the speed will be fast.
I know that this speed vary issue is due to the host side control, device side can do nothing about that, I'm wandering are there any walk around for this speed vary issue?
Thanks. ssrs.jrzs
I'm wondering are there any workaround for this speed vary issue/Thanks.
> I'm wondering are there any workaround for this speed vary issue
Unfortunately, we cannot speed up control transfer on UHCI. UHCI requires intervention of PC device driver to put next stage of control transfer. As usual of host controller, it delays interrupt timing of (stage) transfer until next SOF. Therefore each stage takes (at least) a frame, respectively.
On the other hand, OHCI accepts transaction(s) of next stage on its Transfer Descriptor queue in advance. EHCI works on micro-frame (125 us), 8 times faster than UHCI/OHCI.
This speed problem deeply depends on the architecture of the host controller.
I see. Too bad have to accept this limitation. Thanks, Tsuneo. You are always so kind and helpful :).