VCOM with USB-CDC

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
User avatar
sabdulqadir
Posts: 49
Joined: Fri Mar 23, 2018 7:29 pm
Has thanked: 13 times
Been thanked: 4 times

VCOM with USB-CDC

Post by sabdulqadir »

Hi,
Had a rookie question about having multiple vcom ports using CDC. Can I combine the interrupt endpoints for 2 vcom ports to save an end-point?

thanks,
aQ
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: VCOM with USB-CDC

Post by Giovanni »

Hi,

Not sure, you should try and see how the host takes it.

The demo STM32F4xx-USB_CDC_IAD should allow to test it quickly in usbcfg.h.

Giovanni
User avatar
sabdulqadir
Posts: 49
Joined: Fri Mar 23, 2018 7:29 pm
Has thanked: 13 times
Been thanked: 4 times

Re: VCOM with USB-CDC

Post by sabdulqadir »

Ok,
I was able to get 3 vitural com ports. Just for anyone who may need it ;)
AQ
User avatar
FXCoder
Posts: 403
Joined: Sun Jun 12, 2016 4:10 am
Has thanked: 188 times
Been thanked: 134 times

Re: VCOM with USB-CDC

Post by FXCoder »

Hi,
Looks useful.
What host OS did you try this with?
--
Bob
User avatar
sabdulqadir
Posts: 49
Joined: Fri Mar 23, 2018 7:29 pm
Has thanked: 13 times
Been thanked: 4 times

Re: VCOM with USB-CDC

Post by sabdulqadir »

FXCoder wrote:Hi,
Looks useful.
What host OS did you try this with?
--
Bob

Win10. I think also works with Win7. I remember testing with one of the PC that had Win7.
User avatar
FXCoder
Posts: 403
Joined: Sun Jun 12, 2016 4:10 am
Has thanked: 188 times
Been thanked: 134 times

Re: VCOM with USB-CDC

Post by FXCoder »

Thanks.
My experience with a config for 2 x VCP was that Win10, Mac and Linux were good. However, Win7 VCP driver only saw one com port.
I may try your single interrupt endpoint approach and see if Win7 behaves differently.
Care to post you usbcfg.c & .h ?
User avatar
sabdulqadir
Posts: 49
Joined: Fri Mar 23, 2018 7:29 pm
Has thanked: 13 times
Been thanked: 4 times

Re: VCOM with USB-CDC

Post by sabdulqadir »

FXCoder wrote:Thanks.
My experience with a config for 2 x VCP was that Win10, Mac and Linux were good. However, Win7 VCP driver only saw one com port.
I may try your single interrupt endpoint approach and see if Win7 behaves differently.
Care to post you usbcfg.c & .h ?

Sure.
BTW, I have used two com ports with Win7 without any issues. My comment was for 3 com ports on Win7.
AQ

I could not attach files here. Webpage complained about invalid file formats. Ill try to send them through private msg.
User avatar
FXCoder
Posts: 403
Joined: Sun Jun 12, 2016 4:10 am
Has thanked: 188 times
Been thanked: 134 times

Re: VCOM with USB-CDC

Post by FXCoder »

Hi AQ,
Files retrieved OK.
FYI to post attachments on the forum use a zip.

I'll try out your configs later today on an F413 and see how I go getting additional VCPs, Win versus Win10 etc.

Thanks.
--
Bob
Post Reply