Skip to main content
Visitor II
September 9, 2004
Question

Polled usb

  • September 9, 2004
  • 2 replies
  • 643 views
Posted on September 09, 2004 at 18:03

Polled usb

    This topic has been closed for replies.

    2 replies

    sjoAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:02

    Hi,

    Has anyone implemented polled usb firmware, as the standard ST usb lib for the upsd is interrupt driven. Shame its not like the st7 usb code where you could select either version.

    Is there any reason why a polled version would not work? Before I start writing one.

    Regards

    sjo
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:02

    The original ST example code had some problems with the USB interface due to too much time being spent in the USB interrupt service routine. They did a radical re-write and have re-relased the example code.

    I assume if you wrote your firmware in a polled way, you would get problems due to not servicing th USB interrupt on time.

    Why do you want to write a polled version anyway? Interrupt driven code is neater, more reilable and easier to understand.

    I hope I didn't mis-understand your question and that you were in fact referring to 'interrupt' and 'polled' in the USB sense. In this case, what is referred to as an interrupt transfer is in fact polled. The polling interval is set up in the HID descriptor. IN packet requests are sent by the host at the polling interval