A working composite USB device

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

A working composite USB device

Post 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.


Probably not the most confused programmer anymore on the XCORE forum.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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?
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post 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.
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post 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.
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
fabriceo
XCore Addict
Posts: 181
Joined: Mon Jan 08, 2018 4:14 pm

Post 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 ?
Post Reply