I've added a new IN/OUT Interrupt endpoint to the USB Audio Reference design (to send data from the USB host to the I2C port) and am having some issues with it communicating with WinUSB. My driver is from Thesycon (4 in, 8 out) with my custom descriptors added (see below).My design appears to correctly enumerate and I have audio and can receive data from the host on my OUT endpoint (using a case XUD_GetData_Select(chan, ep, length, res): entry in usb_buffer.xc ).But, when I try to send data back to the host on my IN endpoint (using XUD_SetReady_In(ep, buff, length)) the endpoint appears to send the packet 3 times and then cause an abort.

My program structure is to receive a couple of bytes from the OUT endpoint, either set/get GPIO pins with the data or send the out of the device via I2C write, then I2C read to verify the data written, and send this back to the host via the IN endpoint.The design isn't complete, I'm just at the point of testing USB comms before adding the full I2C/GPIO contol

As you can see, the OUT endpoint from the host triggers IN endpoint transfers from the device but three of them, not just one as coded. This is then followed by a 0xc0010000 error code (USBD_STATUS_CANCELED)