cancel
Showing results for 
Search instead for 
Did you mean: 

Polled usb

sjo
Associate II
Posted on September 09, 2004 at 18:03

Polled usb

2 REPLIES 2
sjo
Associate II
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
neil2
Associate II
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