Thanks for the response Barry !
I have now a strange situation.
Here are my descriptors :
const unsigned char DD[]= // DEVICE Descriptor
{
0x12, // bLength = 18d
0x01, // bDescriptorType = Device (1)
0x00,0x02, // bcdUSB(L/H) USB spec rev (BCD)
0x02, // bDeviceClass,
0x00, // bDeviceSubClass,
0x00, // bDeviceProtocol
0x40, // bMaxPacketSize0 EP0 is 64 bytes
0xD8, 0x04, // idVendor(L/H)
0x0A, 0x00, // idProduct(L/H)
0x02,0x00, // bcdDevice
0x01, // iManufacturer
0x02, // iProduct,
0x00, // iSerialNumber
0x01 // bNumConfigurations
};
const unsigned char CD[]= // CONFIGURATION Descriptor
{
//Configuration Descriptor
0x09, // bLength
0x02, // bDescriptorType = Config
0x3C,0x00, // wTotalLength(L/H) = 60 bytes
0x02, // bNumInterfaces
0x01, // bConfigValue
0x00, // iConfiguration
0xC0, // bmAttributes. b7=1 b6=Bus-powered b5=RWU supported
0x32, // MaxPower is 2 ma
// INTERFACE Descriptor
0x09, // length = 9
0x04, // type = IF
0x00, // IF #0
0x00, // bAlternate Setting
0x01, // bNum Endpoints
0x02, // bInterfaceClass = CDC
0x02, // bInterfaceSubClass,
0x01, // bInterfaceProtocol
0x00, // iInterface
// CDC class specific Descriptor
0x05, // bLength
0x24, // bDescriptorType
0x00, // CDC Header function descriptor
0x10, 0x01, // Rev 1.1
0x05, // bLength
0x24, // bDescriptorType
0x01, // Call Management function descriptor
0x01,
0x01,
0x04, // bLength
0x24, // bDescriptorType
0x02, // Abstract control function descriptor
0x00,
0x05, // bLength
0x24, // bDescriptorType
0x06, // Union function descriptor
0x00,
0x01,
//Endpoint Descriptor - INTERRUPT
0x07, // Size of descriptor
0x05, // Type of descriptor
0x83, // Address of descriptor Bit- 7 1-IN/0-OUT Bit-0-3 endpoint no.
0x03, // bmAtributts Bit- 0-1 indicate transfer type 11-interrupt
0x0A, // LSB Packet size
0x00, // MSB Packet size
0x01, // Polling interval 10 ms
// INTERFACE Descriptor
0x09, // length = 9
0x04, // type = IF
0x01, // IF #1
0x00, // bAlternate Setting
0x02, // bNum Endpoints
0x0A, // bInterfaceClass = CDC
0x00, //bInterfaceSubClass,
0x00, // bInterfaceProtocol
0x00, // iInterface
//Endpoint descriptor BULK OUT
0x07, // Size of descriptor
0x05, // Type of descriptor
0x01, // Address of descriptor Bit- 7 1-IN/0-OUT Bit-0-3 endpoint no.
0x02, // bmAtributts Bit- 0-1 indicate transfer type 10-bulk
0x40, // LSB Packet size
0x00, // MSB Packet size
0x00, // Polling interval 0 ms
//Endpoint descriptor BULK IN
0x07, // Size of descriptor
0x05, // Type of descriptor
0x82, // Address of descriptor Bit- 7 1-IN/0-OUT Bit-0-3 endpoint no.
0x02, // bmAtributts Bit- 0-1 indicate transfer type 10-bulk
0x40, // LSB Packet size
0x00, // MSB Packet size
0x00 // Polling interval 0 ms};
So, the maximum EP0 size is 64 bytes and my config descriptor is of 67 bytes.
For the descriptors above, 60 bytes is the best that is working for me. The device is enumerated properly and works with VCOM port - however, without and BULK IN endpoint.
Hence, I can send the data on BULK OUT but cannot receive on BULK IN.
I tried increasing the size in Device Descriptor as 67, but as MAX3421 has the endpoint size of 64-bytes, enumeration failed.
Any other workaround
Thanks for your precious time !
- Nik