USBHost_t36 Does Not Support 8000Hz Polling Rate for Mouse Devices

XiaoYun

New member
I am using the Razer Viper 8KHz wired mouse. When I test it directly on my computer, it achieves an 8000Hz polling rate without any issues. However, when I try it with my Teensy4.1 using the USBHost_t36 library and the following example for mouse forwarding: MouseKeyboardForward.ino, it appears to only support up to a 4000Hz polling rate.
2023-10-13 191251.png

I've already modified the teensy4\usb_desc.h file and set #define MOUSE_INTERVAL to 1 to ensure that the polling rate from the Teensy4 mouse to the PC is 8000Hz. The current issue seems to be that the polling rate from USBHost_t36 to Teensy4 is limited to 4000Hz. Also, my Teensy recognizes my mouse as a 480Mbps high-speed device.

Can anyone advise if the USBHost_t36 to Teensy4 polling rate supports 8000Hz, or if there's something similar to the MOUSE_INTERVAL=1 modification I need to make in order to achieve this?

Thank you for your assistance!
 
Sorry,

You will probably need to experiment some to see what is going on. I see you are using one of the examples which is good.

Might also help to see more information on what we are seeing from the mouse. For example, information from the HIDDeviceInfo sketch, which shows us the information about how the mouse is defined, etc.

Earlier there was another thread about handling another fast mouse. Pretty sure it was the Glorious Model O - Which we played with some.
 
When I ran the HIDDeviceInfo and subsequently plugged in the mouse, I received the following information:

Code:
[22:49:55.628]receive←◆
USBDeviceInfo claim this=2000E0B8

****************************************
** Device Level **
  vid=1532
  pid=91
  bDeviceClass = 0
  bDeviceSubClass = 0
  bDeviceProtocol = 0
09 04 00 00 01 03 01 02 00 09 21 00 01 00 01 22 5E 00 07 05 81 03 08 00 01 09 04 01 00 01 03 00
01 00 09 21 00 01 00 01 22 9F 00 07 05 82 03 10 00 01 09 04 02 00 01 03 01 01 00 09 21 11 01 00
01 22 3D 00 07 05 83 03 08 00 01 
*** Device HID1 1532:91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
*** Device HID2 1532:91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
*** Device HID3 1532:91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
HIDDumpController(1 : 0x20005220 : 0x2000a680) Claim: 1532:91 usage: 10002 SubClass: 1 Protcol: 2 - Yes

HID Report Descriptor (0x2000a6bc) size: 94
  05 01	// Usage Page(1) - Generic Desktop
  09 02	// Usage(2) -(Mouse)
  A1 01	// Collection(1) top Usage(10000)
    09 01	// Usage(1) -(?)
    A1 00	// Collection(0)
    05 09	// Usage Page(9) - Button
    19 01	// Usage Minimum(1) -  (BUTTON 1)
    29 05	// Usage Maximum(5) -  (BUTTON 5)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 05	// Report Count(5)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    75 01	// Report Size(1)
    95 03	// Report Count(3)
    81 03	// Input(3)	// (Constant, Variable, Absolute)
    06 00 FF	// Usage Page(ff00) - Vendor Defined
    09 40	// Usage(40) -
    75 08	// Report Size(8)
    95 02	// Report Count(2)
    15 81	// Logical Minimum(81)
    25 7F	// Logical maximum(7f)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    05 01	// Usage Page(1) - Generic Desktop
    09 38	// Usage(38) -(Wheel)
    15 81	// Logical Minimum(81)
    25 7F	// Logical maximum(7f)
    75 08	// Report Size(8)
    95 01	// Report Count(1)
    81 06	// Input(6)	// (Data, Variable, Relative)
    09 30	// Usage(30) -(X)
    09 31	// Usage(31) -(Y)
    16 00 80	// Logical Minimum(8000)
    26 
[22:49:55.665]receive←◆FF 7F	// Logical maximum(7fff)
    75 10	// Report Size(10)
    95 02	// Report Count(2)
    81 06	// Input(6)	// (Data, Variable, Relative)
    C0	// End Collection
  06 00 FF	// Usage Page(ff00) - Vendor Defined
  09 02	// Usage(2) -
  15 00	// Logical Minimum(0)
  25 01	// Logical maximum(1)
  75 08	// Report Size(8)
  95 5A	// Report Count(5a)
  B1 01	// Feature(1)	// (Constant, Array, Absolute)
  C0	// End Collection
HIDDumpController(1 : 0x20005220 : 0x2000ad40) Claim: 1532:91 usage: 10006 SubClass: 0 Protcol: 1 - NO (Usage: 10002)
HIDDumpController(2 : 0x20006300 : 0x2000ad40) Claim: 1532:91 usage: 10006 SubClass: 0 Protcol: 1 - Yes

HID Report Descriptor (0x2000ad7c) size: 159
  05 01	// Usage Page(1) - Generic Desktop
  09 06	// Usage(6) -(Keyboard)
  A1 01	// Collection(1) top Usage(10000)
    85 01	// Report ID(1)
    05 07	// Usage Page(7) - Keycode
    19 E0	// Usage Minimum(e0) - (Left Control)
    29 E7	// Usage Maximum(e7) - (Right GUI)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 08	// Report Count(8)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    19 00	// Usage Minimum(0) - (Keycode 0)
    2A FF 00	// Usage Maximum(ff) - (Keycode 255)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 0C	// Usage Page(c) - Consumer
  09 01	// Usage(1) -(Consumer Controls)
  A1 01	// Collection(1) top Usage(c0000)
    85 02	// Report ID(2)
    19 00	// Usage Minimum(0) - (?)
    2A 3C 02	// Usage Maximum(23c) - (AC Format)
    15 00	// Logical Minimum(0)
    26 3C 02	// Logical maximum(23c)
    95 01	// Report Count(1)
    75 10	// Report Size(10)
    81 00	// Input(0)	// (Data, Array, Absolute)
    75 08	// Report Size(8)
    95 0D	// Report Count(d)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 80	// Usage(80) -(?)
  A1 01	// Collection(1) top Usage(10080)
    85 03	// Report ID(3)
    19 81	// Usage Minimum(81) - (System Power Down)
    29 83	// Usage Maximum(83) - (System Wake Up)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 03	// Report Count(3)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    95 05	// Report Count(5)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 04	// Report ID(4)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 05	// Report ID(5)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
HIDDumpController(1 : 0x20005220 : 0x2000ad40) Claim: 1532:91 usage: c0001 SubClass: 0 Protcol: 1 - NO (Usage: 10002)
HIDDumpController(2 : 0x20006300 : 0x2000ad40) Claim: 1532:91 usage: c0001 SubClass: 0 Protcol: 1 - NO (Usage: 10006)
HIDDumpController(3 : 0x200073e0 : 0x2000ad40) Claim: 1532:91 usage: c0001 SubClass: 0 Protcol: 1 - Yes

HID Report Descriptor (0x2000ad7c) size: 159
  05 01	// Usage Page(1) - Generic Desktop
  09 06	// Usage(6) -(Keyboard)
  A1 01	// Collection(1) top Usage(10000)
    85 01	// Report ID(1)
    05 07	// Usage Page(7) - Keycode
    19 E0	// Usage Minimum(e0) - (Left Control)
    29 E7	// Usage Maximum(e7) - (Right GUI)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 08	// Report Count(8)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    19 00	// Usage Minimum(0) - (Keycode 0)
    2A FF 00	// Usage Maximum(ff) - (Keycode 255)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 0C	// Usage Page(c) - Consumer
  09 01	// Usage(1) -(Consumer Controls)
  A1 01	// Collection(1) top Usage(c0000)
    85 02	// Report ID(2)
    19 00	// Usage Minimum(0) - (?)
    2A 3C 02	// Usage Maximum(23c) - (AC Format)
    15 00	// Logical Minimum(0)
    26 3C 02	// Logical maximum(23c)
    95 01	// Report Count(1)
    75 10	// Report Size(10)
    81 00	// Input(0)	// (Data, Array, Absolute)
    75 08	// Report Size(8)
    95 0D	// Report Count(d)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 80	// Usage(80) -(?)
  A1 01	// Collection(1) top Usage(10080)
    85 03	// Report ID(3)
    19 81	// Usage Minimum(81) - (System Power Down)
    29 83	// Usage Maximum(83) - (System Wake Up)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 03	// Report Count(3)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    95 05	// Report Count(5)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 04	// Report ID(4)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 05	// Report ID(5)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
HIDDumpController(1 : 0x20005220 : 0x2000ad40) Claim: 1532:91 usage: 10080 SubClass: 0 Protcol: 1 - NO (Usage: 10002)
HIDDumpController(2 : 0x20006300 : 0x2000ad40) Claim: 1532:91 usage: 10080 SubClass: 0 Protcol: 1 - NO (Usage: 10006)
HIDDumpController(3 : 0x200073e0 : 0x2000ad40) Claim: 1532:91 usage: 10080 SubClass: 0 Protcol: 1 - NO (Usage: c0001)
HIDDumpController(4 : 0x200084c0 : 0x2000ad40) Claim: 1532:91 usage: 10080 SubClass: 0 Protcol: 1 - Yes

HID Report Descriptor (0x2000ad7c) size: 159
  05 01	// Usage Page(1) - Generic Desktop
  09 06	// Usage(6) -(Keyboard)
  A1 01	// Collection(1) top Usage(10000)
    85 01	// Report ID(1)
    05 07	// Usage Page(7) - Keycode
    19 E0	// Usage Minimum(e0) - (Left Control)
    29 E7	// Usage Maximum(e7) - (Right GUI)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 08	// Report Count(8)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    19 00	// Usage Minimum(0) - (Keycode 0)
    2A FF 00	// Usage Maximum(ff) - (Keycode 255)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 0C	// Usage Page(c) - Consumer
  09 01	// Usage(1) -(Consumer Controls)
  A1 01	// Collection(1) top Usage(c0000)
    85 02	// Report ID(2)
    19 00	// Usage Minimum(0) - (?)
    2A 3C 02	// Usage Maximum(23c) - (AC Format)
    15 00	// Logical Minimum(0)
    26 3C 02	// Logical maximum(23c)
    95 01	// Report Count(1)
    75 10	// Report Size(10)
    81 00	// Input(0)	// (Data, Array, Absolute)
    75 08	// Report Size(8)
    95 0D	// Report Count(d)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 80	// Usage(80) -(?)
  A1 01	// Collection(1) top Usage(10080)
    85 03	// Report ID(3)
    19 81	// Usage Minimum(81) - (System Power Down)
    29 83	// Usage Maximum(83) - (System Wake Up)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 03	// Report Count(3)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    95 05	// Report Count(5)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 04	// Report ID(4)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 05	// Report ID(5)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
HIDDumpController(1 : 0x20005220 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: 10002)
HIDDumpController(2 : 0x20006300 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: 10006)
HIDDumpController(3 : 0x200073e0 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: c0001)
HIDDumpController(4 : 0x200084c0 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: 10080)
HIDDumpController(5 : 0x200095a0 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - Yes

HID Report Descriptor (0x2000ad7c) size: 159
  05 01	// Usage Page(1) - Generic Desktop
  09 06	// Usage(6) -(Keyboard)
  A1 01	// Collection(1) top Usage(10000)
    85 01	// Report ID(1)
    05 07	// Usage Page(7) - Keycode
    19 E0	// Usage Minimum(e0) - (Left Control)
    29 E7	// Usage Maximum(e7) - (Right GUI)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 08	// Report Count(8)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    19 00	// Usage Minimum(0) - (Keycode 0)
    2A FF 00	// Usage Maximum(ff) - (Keycode 255)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 0C	// Usage Page(c) - Consumer
  09 01	// Usage(1) -(Consumer Controls)
  A1 01	// Collection(1) top Usage(c0000)
    85 02	// Report ID(2)
    19 00	// Usage Minimum(0) - (?)
    2A 3C 02	// Usage Maximum(23c) - (AC Format)
    15 00	// Logical Minimum(0)
    26 3C 02	// Logical maximum(23c)
    95 01	// Report Count(1)
    75 10	// Report Size(10)
    81 00	// Input(0)	// (Data, Array, Absolute)
    75 08	// Report Size(8)
    95 0D	// Report Count(d)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 80	// Usage(80) -(?)
  A1 01	// Collection(1) top Usage(10080)
    85 03	// Report ID(3)
    19 81	// Usage Minimum(81) - (System Power Down)
    29 83	// Usage Maximum(83) - (System Wake Up)
    15 00	// Logical Minimum(0)
    25 01	// Logical maximum(1)
    75 01	// Report Size(1)
    95 03	// Report Count(3)
    81 02	// Input(2)	// (Data, Variable, Absolute)
    95 05	// Report Count(5)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    75 08	// Report Size(8)
    95 0E	// Report Count(e)
    81 01	// Input(1)	// (Constant, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 04	// Report ID(4)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
  05 01	// Usage Page(1) - Generic Desktop
  09 00	// Usage(0) -(?)
  A1 01	// Collection(1) top Usage(10000)
    85 05	// Report ID(5)
    09 03	// Usage(3) -(?)
    15 00	// Logical Minimum(0)
    26 FF 00	// Logical maximum(ff)
    35 00	// Physical Minimum(0)
    46 FF 00	// Physical Maximum(ff)
    75 08	// Report Size(8)
    95 0F	// Report Count(f)
    81 00	// Input(0)	// (Data, Array, Absolute)
    C0	// End Collection
HIDDumpController(1 : 0x20005220 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: 10002)
HIDDumpController(2 : 0x20006300 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: 10006)
HIDDumpController(3 : 0x200073e0 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: c0001)
HIDDumpController(4 : 0x200084c0 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - NO (Usage: 10080)
HIDDumpController(5 : 0x200095a0 : 0x2000ad40) Claim: 1532:91 usage: 10000 SubClass: 0 Protcol: 1 - Yes
HIDDumpController(1 : 0x20005220 : 0x2000b400) Claim: 1532:91 usage: 10006 SubClass: 1 Protcol: 1 - NO (Usage: 10002)
HIDDumpCon
[22:49:55.706]receive←◆troller(2 : 0x20006300 : 0x2000b400) Claim: 1532:91 usage: 10006 SubClass: 1 Protcol: 1 - Yes
>> Boot Keyboard - Send SET_IDLE <<
*** HID Device hdc1 1532: 91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
*** HID Device hdc2 1532: 91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
*** HID Device hdc3 1532: 91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
*** HID Device hdc4 1532: 91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
*** HID Device hdc5 1532: 91 - connected ***
  manufacturer: Razer
  product: Razer Viper 8KHz
HID(2 : 10006): 05 02 0C 80 0C 80 00 00 00 00 00 00 00 00 00 00 
END:
END:
END:
END:
Begin topusage:10000 type:0 min:0 max:255
usage=10002, value=1 (Mouse)
usage=1000C, value=1 (?)
usage=10080, value=1 (?)
usage=1000C, value=1 (?)
usage=10080, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
usage=10000, value=1 (?)
END:

To gather more in-depth data, I uncommented USBHOST_PRINT_DEBUG in the USBHost_t36.h file and then connected the mouse. This was the information I received:

Code:
[23:11:02.147]receive←◆port change: 10001803
    connect

[23:11:02.247]receive←◆  begin reset

[23:11:02.302]receive←◆port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 32 15 91 00 01 01 01 02 00 01 
    VendorID = 1532, ProductID = 0091, Version = 0101
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Razer
enumeration:
Product: Razer Viper 8KHz
enumeration:
Config data length = 84
enumeration:
Configuration Descriptor:
  09 02 54 00 03 01 00 E0 FA 
    NumInterfaces = 3
    ConfigurationValue = 1
  09 04 00 00 01 03 01 02 00 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 2(Mouse)
  09 21 00 01 00 01 22 5E 00 
    HID, 1 report descriptor
  07 05 81 03 08 00 01 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 1
  09 04 01 00 01 03 00 01 00 
    Interface = 1
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 0 / 1
  09 21 00 01 00 01 22 9F 00 
    HID, 1 report descriptor
  07 05 82 03 10 00 01 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 16
    Polling Interval = 1
  09 04 02 00 01 03 01 01 00 
    Interface = 2
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 1(Keyboard)
  09 21 11 01 00 01 22 3D 00 
    HID, 1 report descriptor
  07 05 83 03 08 00 01 
    Endpoint = 3 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 1
enumeration:
HIDParser claim this=20003220
HIDParser claim this=20004D20
HIDParser claim this=200053E0
USBHub memory usage = 960
USBHub claim_device this=20008320
USBHub memory usage = 960
USBHub claim_device this=200086E0
HIDParser claim this=20005AA0
HIDParser claim this=20006160
HIDParser claim this=20006820
HIDParser claim this=20006EE0
HIDParser claim this=200075A0
HIDParser claim this=20007C60
HIDParser claim this=200038E0
HIDParser claim this=20003FA0
HIDParser claim this=20004660
Descriptor 4 = INTERFACE
HIDParser claim this=20003220
 bInterfaceNumber =   0
 bInterfaceClass =    3
 bInterfaceSubClass = 1
 bInterfaceProtocol = 2
HID Parser Claim: 09 04 00 00 01 03 01 02 00 09 21 00 01 00 01 22 5E 00 07 05 81 03 08 00 01 09 04 01 00 01 03 00 01 00 09 21 00 01 00 01 22 9F 00 07 05 82 03 10 00 01 09 04 02 00 01 03 01 01 00 09 21 11 01 00 01 22 3D 00 07 05 83 03 08 00 01 
report descriptor size = 94
Single endpoint HID:
  endpoint = 81
   size = 8
   interval = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 1
  interval = 1
 best_bandwidth = 3, at offset = 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
HIDParser claim this=20004D20
 bInterfaceNumber =   1
 bInterfaceClass =    3
 bInterfaceSubClass = 0
 bInterfaceProtocol = 1
HID Parser Claim: 09 04 01 00 01 03 00 01 00 09 21 00 01 00 01 22 9F 00 07 05 82 03 10 00 01 09 04 02 00 01 03 01 01 00 09 21 11 01 00 01 22 3D 00 07 05 83 03 08 00 01 
report descriptor size = 159
Single endpoint HID:
  endpoint = 82
   size = 16
   interval = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 1
  interval = 1
 best_bandwidth = 6, at offset = 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
HIDParser claim this=200053E0
 bInterfaceNumber =   2
 bInterfaceClass =    3
 bInterfaceSubClass = 1
 bInterfaceProtocol = 1
HID Parser Claim: 09 04 02 00 01 03 01 01 00 09 21 11 01 00 01 22 3D 00 07 05 83 03 08 00 01 
report descriptor size = 61
Single endpoint HID:
  endpoint = 83
   size = 8
   interval = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 1
  interval = 1
 best_bandwidth = 9, at offset = 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
control callback (hid)
05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 05 15 00 25 01 75 01 95 05 81 02 75 01 95 03 81 03 06 00 FF 09 40 75 08 95 02 15 81 25 7F 81 02 05 01 09 38 15 81 25 7F 75 08 95 01 81 06 09 30 09 31 16 00 80 26 FF 7F 75 10 95 02 81 06 C0 06 00 FF 09 02 15 00 25 01 75 08 95 5A B1 01 C0 
  mesg = 22000681
  got report descriptor
Found top level collection 10002
find_driver
  driver 20009930
control callback (hid)
05 01 09 06 A1 01 85 01 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 19 00 2A FF 00 15 00 26 FF 00 75 08 95 0E 81 00 C0 05 0C 09 01 A1 01 85 02 19 00 2A 3C 02 15 00 26 3C 02 95 01 75 10 81 00 75 08 95 0D 81 01 C0 05 01 09 80 A1 01 85 03 19 81 29 83 15 00 25 01 75 01 95 03 81 02 95 05 81 01 75 08 95 0E 81 01 C0 05 01 09 00 A1 01 85 04 09 03 15 00 26 FF 00 35 00 46 FF 00 75 08 95 0F 81 00 C0 05 01 09 00 A1 01 85 05 09 03 15 00 26 FF 00 35 00 46 FF 00 75 08 95 0F 81 00 C0 
  mesg = 22000681
  got report descriptor
Found top level collection 10006
find_driver
  driver 20009930
  driver 20009968
  driver 200099A0
  driver 200099D8
  driver 200096B0
Found top level collection C0001
find_driver
  driver 20009930
  driver 20009968
  driver 200099A0
  driver 200099D8
  driver 200096B0
Found top level collection 10080
find_driver
  driver 20009930
  driver 20009968
  driver 200099A0
  driver 200099D8
  driver 200096B0
Found top level collection 10000
find_driver
  driver 20009930
  driver 20009968
  driver 200099A0
  driver 200099D8
  driver 200096B0
  driver 20009750
  driver 200097F0
  driver 20009890
No Driver claimed topusage: 10000
Found top level collection 10000
find_driver
  driver 20009930
  driver 20009968
  driver 200099A0
  driver 200099D8
  driver 200096B0
  driver 20009750
  driver 200097F0
  driver 20009890
No Driver claimed topusage: 10000
control callback (hid)
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 81 01 19 00 2A FF 00 15 00 26 FF 00 75 08 95 06 81 00 05 08 19 01 29 03 15 00 25 01 75 01 95 03 91 02 95 05 91 01 C0 
  mesg = 22000681
  got report descriptor
Found top level collection 10006
find_driver
  driver 20009930
  driver 20009968
  driver 200099A0
  driver 200099D8
  driver 200096B0
control callback (hid)
  mesg = A21
begin, usage=10000
       type= 2
       min=  0
       max=  1
       reportcount=5
       usage count=255
       usage min max count=1
Input, total bits=5
  usage = 90001  data = 0
  usage = 90002  data = 0
  usage = 90003  data = 0
  usage = 90004  data = 0
  usage = 90005  data = 0
begin, usage=10000
       type= 2
       min=  -127
       max=  127
       reportcount=2
       usage count=1
       usage min max count=0
Input, total bits=16
  usage = FF000040  sdata = 0
  usage = FF000041  sdata = -1
begin, usage=10000
       type= 6
       min=  -127
       max=  127
       reportcount=1
       usage count=1
       usage min max count=0
Input, total bits=8
  usage = 10038  sdata = 0
begin, usage=10000
       type= 6
       min=  -32768
       max=  32767
       reportcount=2
       usage count=2
       usage min max count=0
Input, total bits=32
  usage = 10030  sdata = 0
  usage = 10031  sdata = -1
begin, usage=10000
       type= 2
       min=  0
       max=  1
       reportcount=5
       usage count=255
       usage min max count=1
Input, total bits=5
  usage = 90001  data = 0
  usage = 90002  data = 0
  usage = 90003  data = 0
  usage = 90004  data = 0
  usage = 90005  data = 0
begin, usage=10000
       type= 2
       min=  -127
       max=  127
       reportcount=2
       usage count=1
       usage min max count=0
Input, total bits=16
  usage = FF000040  sdata = 1
  usage = FF000041  sdata = 0
begin, usage=10000
       type= 6
       min=  -127
       max=  127
       reportcount=1
       usage count=1
       usage min max count=0
Input, total bits=8
  usage = 10038  sdata = 0
begin, usage=10000
       type= 6
       min=  -32768
       max=  32767
       reportcount=2
       usage count=2
       usage min max count=0
Input, total bits=32
  usage = 10030  sdata = 1
  usage = 10031  sdata = 0

I've already ascertained that this particular mouse doesn't require any additional drivers when plugged into a PC to achieve an 8000hz polling rate. However, when utilizing USBHost_t36, it only manages a 4000Hz polling rate. I hope someone with experience in this area can help identify the underlying cause.

Thank you in advance for your insights and support!
 
This is possibly caused by only one interrupt read transfer being queued at a time but 8000Hz requires polling at every microframe.

So a read is queued, it completes and the USB controller raises an interrupt at the start of the next microframe (because the interrupt threshold is set to 1), the interrupt handler processes the input data and finally queues the next read - but that won't be processed until the next microframe, so in effect the polling interval is 2 instead of 1 (equivalent to 4kHz instead of 8kHz).
The host code would need to queue two reads and flip-flop between them for maximum efficiency.
 
Back
Top