Author Topic: confirmation on understating of interrupt polls?  (Read 47 times)

ulao

  • Frequent Contributor
  • ****
  • Posts: 107
confirmation on understating of interrupt polls?
« on: July 06, 2018, 11:13:53 am »
Correct me if I'm wrong but if I have say a game pad usb 1.1 usb device that the host asks for data from every 8 to 10 ms (interrupt in pipe) the host will be responsible for retrieving the data. That is to say an application must be asking for it?

When I watch a sniffer I see the data sent every 8ms. I have not tried this yet but I'm under the impressionist if I close the app that is using the device that data will no longer be asked for, thus freeing up the pipe of talk data?

The reason I ask is the control transfers must wait for nak before sending data. So when this interrupt data is going on it sits in naking for a bit.  If I were to exit the application would interrupt data stop (I assume so). Thus allowing the control transfers to go a bit more smoothly. Of course the interrupt frames will still occur ever 1ms or so.

Do I have that about right?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2703
    • Lakeview Research
Re: confirmation on understating of interrupt polls?
« Reply #1 on: July 06, 2018, 11:34:04 am »
The HID driver continuously requests data from interrupt IN endpoints regardless of whether an application is using the data.

ulao

  • Frequent Contributor
  • ****
  • Posts: 107
Re: confirmation on understating of interrupt polls?
« Reply #2 on: July 06, 2018, 02:12:19 pm »
Is there anything that would send a leave me a lone request. I think any type of reply other then the data format it wants causes the host to drop the client.

My implementation of usb has this

#define USB_CFG_HAVE_FLOWCONTROL        0
/* Define this to 1 if you want flowcontrol over USB data. See the definition
 * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
 * usbdrv.h.
 */

#define usbDisableAllRequests()     usbRxLen = -1
/* Must be called from usbFunctionWrite(). This macro disables all data input
 * from the USB interface. Requests from the host are answered with a NAK
 * while they are disabled.
 */

but I'd think this would also disable control transfers.
« Last Edit: July 06, 2018, 02:17:25 pm by ulao »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2703
    • Lakeview Research
Re: confirmation on understating of interrupt polls?
« Reply #3 on: July 06, 2018, 08:58:57 pm »
If the device is HID-class, it must work with the host's HID driver, which will poll the interrupt IN endpoint.