Page 1 of 1

HID read speed?

Posted: Thu Aug 15, 2013 6:18 pm
by 1.21Gigawatts
I am creating a new HID device to deliver real-time data to a PC (or Mac). I have used a template for a game controller with a single slider and no buttons to get the smallest report descriptor:

Code: Select all

PROGMEM const char usbHidReportDescriptor[24] = {
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x05,                    // USAGE (Game Pad)
    0xa1, 0x01,                    // COLLECTION (Application)
    0xa1, 0x00,                    //   COLLECTION (Physical)
    0x05, 0x01,                    //     USAGE_PAGE (Generic Desktop)
    0x09, 0x36,                    //     USAGE (Slider)
    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
    0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
    0x75, 0x08,                    //     REPORT_SIZE (8)
    0x95, 0x01,                    //     REPORT_COUNT (1)
    0x81, 0x02,                    //     INPUT (Data,Var,Abs)
    0xc0,                          //     END_COLLECTION
    0xc0                           // END_COLLECTION
};

My problem is that this only seems to get read every 35mS or so, and I need to be able to go at least three times as fast. I tried this with a more complicated report descriptor (X & Y 2-byte axes and 8 buttons) and the speed was about the same.

I'm developing on win 7-64 (but will also have a Mac application). Is this a windows limitation, or maybe an HID limitation? Can I not send data over an HID interface faster than this? If not, I'll have to go to a much messier plan B, and whatever drivers that entails. I do like the HID interface, given the lack of drivers and the clean installation that allows.

Re: HID read speed?

Posted: Thu Aug 15, 2013 9:21 pm
by 1.21Gigawatts
Well, it certainly does help to RTFM, doesn't it? I simply changed USB_CFG_INTR_POLL_INTERVAL from 100 to 10, and all is well.
Sorry for the intrusion.