Page 1 of 1

A working composite USB device

Posted: Fri Sep 21, 2018 5:14 pm
by lilltroll
I made an example with a composite USB device, giving you 2 virtual COM ports in Windows from the same device using the default drivers in Win10.
I could not find any working example of using the Interface Association Descriptor within the USB Configuration Descriptor with XMOS, so here is one.

Works on my xCORE-200 explorer kit.

https://github.com/lilltroll77/USB_dual_CDC_explorer

I do not know if OS X uses the IAD.

Re: A working composite USB device

Posted: Fri Sep 21, 2018 5:26 pm
by mon2
Well done! This is excellent.

Could this concept be extended to 4 such CDC ports? or more? Or is there a max limit you have found?

Re: A working composite USB device

Posted: Fri Sep 21, 2018 5:35 pm
by lilltroll
The hard limit would be USB interface channels (16IN 16 OUT)
Maybe 7 CDC's could work. 7*2+1 endpoint0 <=16, using [[combinable]] for the CdcEndpointsHandler.
I would prefer to write a parser for the USB Configuration Descriptor, because writing it correctly by hand would drive me crazy for 7 CDC's.

Re: A working composite USB device

Posted: Fri Sep 21, 2018 6:08 pm
by mon2
Noted with thanks! Have followed some of the USB posts related to composite USB devices by Dr Tsuneo Chinzei across ST, Silabs, Microchip, NXP and other user forums. We need him here on the XMOS forum :)

He is truly a madman genius and mean that with the utmost respect.

FYI:

https://www.researchgate.net/scientific ... eo_Chinzei

Worth searching for his many posts on USB but appears you have a solid handle on this. Will test as soon as have some free time.

Thanks again for your public post of this project.

Re: A working composite USB device

Posted: Fri Sep 21, 2018 10:06 pm
by lilltroll
I wrote the parser.

I got 4 CDC's enumerating in Windows using 30/32 channel ends on one tile.
Getting more CDC's would require some hacking in the USB lib.

Re: A working composite USB device

Posted: Wed Apr 10, 2019 1:49 pm
by fabriceo
this is really cool, from your experience, can this be integrated in the USB_audio applications too ? I ve seen some tread about that and may be this fresh approach is easier ?