Tool/software: TI-RTOS
I have develop a usb hid device with TI-RTOS.The hid device is enumerated as high-speed device,and set poll interval byte of endpoint descriptor is 1。
According to the USB protocol,The interval time is 2^(n-1)*(microframe),when n= 1 and microframe = 125us, the host poll interval time is 0.125us as same as SOF。But the actual interval is 2 ms ( 16 SOF).
The result is inconsistency with endpoint descriptors.
const uint8_t g_pInterface[] =
{
/* Vendor specific interface descriptor */
9, /* Size of the interface descriptor. */
USB_DTYPE_INTERFACE, /* Type of this descriptor. */
0, /* The index for this interface. */
0, /* The alternate setting for this interface. */
2, /* The number of endpoints used by this interface. */
USB_CLASS_HID, /* The interface class */
USB_INTERFACE_SUBCLASS_BOOT,/* The interface sub-class. */
USB_INTERFACE_PROTOCOL_KEYBOARD,/* The interface protocol for the sub-class specified above. */
0, /* The string index for this interface. */
/* HID Descriptor */
9, // Size of this descriptor in UINT8s.
HID_DT_HID, // HID descriptor type.
0x10,
0x01, // HID Class Spec. release number.
0x00, // H/W target country.
0x01, // Number of HID class descriptors to follow.
HID_DT_REPORT, // Dscriptor type.
HID_RPT_SIZE & 0x00FF,
(HID_RPT_SIZE & 0xFF00) >> 8,
/* Endpoint descriptor */
7, /* The size of the endpoint descriptor. */
USB_DTYPE_ENDPOINT, /* Descriptor type is an endpoint. */
USB_EP_DESC_IN | INT_IN_ENDPOINT,
USB_EP_ATTR_INT, /* Endpoint is a int endpoint. */
USBShort(DATA_IN_EP_MAX_SIZE), /* The maximum packet size. */
1, /* The polling interval for this endpoint. */
/* Endpoint descriptor */
7, /* The size of the endpoint descriptor. */
USB_DTYPE_ENDPOINT, /* Descriptor type is an endpoint. */
USB_EP_DESC_OUT | INT_OUT_ENDPOINT,
USB_EP_ATTR_INT, /* Endpoint is a int endpoint. */
USBShort(DATA_OUT_EP_MAX_SIZE), /* The maximum packet size. */
1, /* The polling interval for this endpoint. */
};