2016-11-03 06:02 AM
Hi - I am trying to implement UAC 2 as part of a project. I have setup the descriptors and it enumerates and is recognosed by the PC. The problem arisises when I try to stream the audio data to the PC. If I set the bInterval for the endpoint to anything other than 1 (125uS) the PC receives 0 length packets. It works set to 1 but sending such small packets so frequently is a very inieficent use of bus bandwidth.
Anybody have any ideas? Edit : I should have mentioned that the Data_In callback never gets called with bInterval of more than 1 so the initial USBD_LL_Transmit in the init function works and then no further calls. The PC ends sees response of success with length 0.2017-01-19 04:49 AM
I am seeing this with OUT endpoints now too.
I wonder if it relates to the fact that if you search for bInterval on google the first thing that comes up is
http://www.beyondlogic.org/usbnutshell/usb5.shtml
which states :
6 bInterval 1 Number
Interval for polling endpoint data transfers. Value in frame counts. Ignored for Bulk & Control Endpoints. Isochronous must equal 1 and field may range from 1 to 255 for interrupt endpoints.Which is incorrect according to page 47 of the USB2 standard which states :
An isochronous endpoint must specify its required bus access period. Full-/high-speed endpoints must
specify a desired period as (2bInterval-1) x F, where bInterval is in the range one to (and including) 16 and F is125 μs for high-speed and 1ms for full-speed. This allows full-/high-speed isochronous transfers to haverates slower than one transaction per (micro)frame. However, an isochronous endpoint must be prepared tohandle poll rates faster than the one specified. A host must not issue more than 1 transaction in a(micro)frame for an isochronous endpoint unless the endpoint is high-speed, high-bandwidth (see below).An isochronous IN endpoint must return a zero-length packet whenever data is requested at a faster intervalthan the specified interval and data is not available.