HID reading freq

This is the English forum for all topics related to JoyWarrior. Please post in English only

Moderator: Guido Körber

Post Reply
novitsky
Posts: 4
Joined: Tue Jul 31, 2012 6:16 am
Location: TAU
Contact:

HID reading freq

Post by novitsky »

I read in this forum that the limit for reading samples from the JoyWarrior24F14 is 125Hz, but is this true for reading also from HID interface? I used my code posted here: viewtopic.php?f=3&t=1693
and it reads the HID at about 339 Hz with no repeat values. can anyone confirm this?

thanks,
Ran
aut disce aut discede
http://www.bgu.ac.il/~novitsky
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: HID reading freq

Post by Guido Körber »

Interesting. This might be due to implementation details of the USB host controller driver used in your configuration.

The USB spec limits low speed devices like the JW24F14 to specify a maximum polling time of 10 ms as the fastest rate. It is up to the host to make sure that this speed is met as a minimum. Basically all implementations do scan the devices every 8 ms if they specify 10 ms. But especially on High Speed hosts (USB 2.0/3.0) the speed can be higher due to the way transactions are handeled.
novitsky
Posts: 4
Joined: Tue Jul 31, 2012 6:16 am
Location: TAU
Contact:

Re: HID reading freq

Post by novitsky »

I use fedora 17 and libusb for reading the HID interface on a usb2.0 host. I had a problem at first and the code would halt, as I now understand from your reply, due to the speed limitation. The solution was to clear the halt (libusb_clear_halt command) and read the new report. I get good readings with about 3 ms delay (that might be faster with a clearer code).
aut disce aut discede
http://www.bgu.ac.il/~novitsky
Post Reply