2004-09-09 09:03 AM
2011-05-17 03:02 AM
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 sjo2011-05-17 03:02 AM
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