We are using multiple IN EPs in our design. I configure the endpoints in the USB_Descriptor_Configuration_t configuration_descriptor in Dave/Generated/USBD_WINUSB/winusb/descriptors.c and h file.
The endpoints show up ok in Windows but communication on other EPs than the first does not work (data gets stuck in the EP, USBD_Endpoint_t ep->InInUse is true).
Using the same number of endpoints on a competitor MCU works with no issues using the same test application in Windows.
The reported error in Windows is: ERROR_GEN_FAILUE 31 (ox1F) A device attached to the sustem is not functioning.
Communication on the first endpoint is working well.
Any ideas what could be causing this behaviour?

This is the winusb configuration:
.winusb_interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t),
.Type = DTYPE_Interface},
.InterfaceNumber = 0,
.AlternateSetting = 0,
.TotalEndpoints = 3,
.Class = USB_CSCP_VendorSpecificClass,
.SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = USB_CSCP_NoDeviceProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR
},


This is the configurations of the IN EPs
.winusb_data_in_endpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t),
.Type = DTYPE_Endpoint},
.EndpointAddress = (ENDPOINT_DIR_IN | WINUSB_TX_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = WINUSB_TXRX_EPSIZE,
.PollingIntervalMS = 0x00
}
.winusb_data_in2_endpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t),
.Type = DTYPE_Endpoint},
.EndpointAddress = (ENDPOINT_DIR_IN | WINUSB_TX2_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = WINUSB_TXRX_EPSIZE,
.PollingIntervalMS = 0x00
}
WINUSB_TXRX_EPSIZE is 64
WINUSB_TX1_EPNUM is 2
WINUSB_TX2_EPNUM is 3

typedef struct
{
USB_Descriptor_Configuration_Header_t config;
USB_Descriptor_Interface_t winusb_interface;
USB_Descriptor_Endpoint_t winusb_data_out_endpoint;
USB_Descriptor_Endpoint_t winusb_data_in_endpoint;
USB_Descriptor_Endpoint_t winusb_data_in2_endpoint;
} USB_Descriptor_Configuration_t;