USB CDC Conversion it with Isochronous Endpoint

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB CDC Conversion it with Isochronous Endpoint

1,809 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NaveedAhmed on Thu Dec 17 05:18:32 MST 2015
Hi,
I am using usb cdc application that is working with the bulk endpoints. As i have time critical data so that's i want to use isochronous endpoint. i am working with it but after changing endpoint type the endpoint size it still not working what will be the solution. As i already asked to much questions some suggestion that we can't use the USB CDC class with isochronous endpoints. if its rights. Then how to write a specific class that use the isochronous endpoint or anyother class that is modifiable and operate able with isochronous endpoints like(HID, MSC). Please guide me.
Please ignore my grammar.
Thanks in advance
Labels (1)
0 Kudos
Reply
5 Replies

1,548 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Mon Dec 21 09:28:48 MST 2015
.PollingIntervalMS = 0xFF

that might not be good.  Set it to something other than 0xff,  perhaps 2.
0 Kudos
Reply

1,548 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NaveedAhmed on Sun Dec 20 21:57:42 MST 2015
Thanks for replying.
Below i have pasted the Device descriptors.

One thing i want to clear. its necessary that we must have windows 8 or above to work with isochr endpoints?  As  i am working with windows 7.

<pre>
USB_Descriptor_Device_t DeviceDescriptor = {
.Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},

.USBSpecification       = VERSION_BCD(01.10),
.Class                  = CDC_CSCP_CDCClass,
.SubClass               = CDC_CSCP_NoSpecificSubclass,
.Protocol               = CDC_CSCP_NoSpecificProtocol,

.Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE, //64 byte

.VendorID               = 0x1fc9,/* NXP */
.ProductID              = 0x2047,
.ReleaseNumber          = VERSION_BCD(00.01),

.ManufacturerStrIndex   = 0x01,
.ProductStrIndex        = 0x02,
.SerialNumStrIndex      = USE_INTERNAL_SERIAL,

.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS //1
};

/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
*  of the device in one of its supported configurations, including information about any device interfaces
*  and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
*  a configuration so that the host may correctly communicate with the USB device.
*/
USB_Descriptor_Configuration_t ConfigurationDescriptor = {
.Config = {
.Header                 = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t) - 1,// termination byte not included in size
.TotalInterfaces        = 2,

.ConfigurationNumber    = 1,
.ConfigurationStrIndex  = NO_DESCRIPTOR,

.ConfigAttributes       = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),

.MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)
},

.CDC_CCI_Interface = {
.Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},

.InterfaceNumber        = 0,
.AlternateSetting       = 0,

.TotalEndpoints         = 1,

.Class                  = CDC_CSCP_CDCClass,
.SubClass               = CDC_CSCP_ACMSubclass,
.Protocol               = CDC_CSCP_ATCommandProtocol,

.InterfaceStrIndex      = NO_DESCRIPTOR
},

.CDC_Functional_Header = {
.Header                 = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface},
.Subtype                = CDC_DSUBTYPE_CSInterface_Header,

.CDCSpecification       = VERSION_BCD(01.10),
},

.CDC_Functional_ACM = {
.Header                 = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface},
.Subtype                = CDC_DSUBTYPE_CSInterface_ACM,

.Capabilities           = 0x06,
},

.CDC_Functional_Union = {
.Header                 = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype                = CDC_DSUBTYPE_CSInterface_Union,

.MasterInterfaceNumber  = 0,
.SlaveInterfaceNumber   = 1,
},

.CDC_NotificationEndpoint = {
.Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},

//.EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
.EndpointAddress        = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
.Attributes             = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize           = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS      = 0xFF
},

.CDC_DCI_Interface = {
.Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},

.InterfaceNumber        = 1,
.AlternateSetting       = 0,

.TotalEndpoints         = 2,

.Class                  = CDC_CSCP_CDCDataClass,
.SubClass               = CDC_CSCP_NoDataSubclass,
.Protocol               = CDC_CSCP_NoDataProtocol,

.InterfaceStrIndex      = NO_DESCRIPTOR
},

.CDC_DataOutEndpoint = {
.Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},

//.EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
.EndpointAddress        = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
.Attributes             = EP_TYPE_ISOCHRONOUS,//(EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize           = CDC_TXRX_EPSIZE, //512 bytes
.PollingIntervalMS      = 0x01
},

.CDC_DataInEndpoint = {
.Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},

//.EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
.EndpointAddress        = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
.Attributes             = EP_TYPE_ISOCHRONOUS,//(EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize           = CDC_TXRX_EPSIZE,
.PollingIntervalMS      = 0x01
},

.CDC_Termination = 0x00
};


</pre>
0 Kudos
Reply

1,548 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Fri Dec 18 09:41:10 MST 2015
it gets complicated, start here
https://msdn.microsoft.com/en-us/library/windows/hardware/ff538820(v=vs.85).aspx
I may be wrong, but I seem to remember reading that Isoc endpoints were not supported on previous versions of Windows.  But I am not sure of which versions :(

It is not so much the content of the .inf, but it needs to be signed for 64 bit OS and for Win 8 and above.
you might want to post your descriptor data.
0 Kudos
Reply

1,548 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NaveedAhmed on Thu Dec 17 21:28:23 MST 2015
Thanks for replying rocketdawg.

you are right that with Isoch, you have to perform a CRC and then inform the other side to re-transmit if the packet is bad.
At this time i have no concern with the integrity of data.
What changes should i make in the .inf file so that host support the isoch endpoints?
Please guide me.
Thanks
0 Kudos
Reply

1,548 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Thu Dec 17 09:14:21 MST 2015
You may find that the Host OS might not support Isochronous endpoints on CDC.
Did you change the .inf file?
besides, bulk is faster if one can keep the pipeline full, perhaps not on Full Speed, but certainly on High Speed.
Why? Because bulk has automatic retries if there is a error, with Isoch, you have to perform a CRC and then inform the other side to re-transmit if the packet is bad.
0 Kudos
Reply