Page 1 of 1

Three serial com ports with CDC drivers

Posted: Thu Apr 29, 2021 5:57 am
by sabdulqadir
Hi,
I was successful in getting three virtual com ports to work on my target stm32f723. I had to give up speed to do that though (because of double memcpy that comes with serial usb).
Now I am trying to mix and match, where out of three, I want two to use serial usb while one uses raw usbTransmit(). I am not able to get this to work. I see some data being transferred and then the debugger loses connection with the target. I am still looking into the stack to figure out where it breaks.

In the meanwhile, I thought ill ask here if anyone has attempted such and if this can even be done or not.

Thanks,
AQ

ChibiOS: v20.3.2

Re: Three serial com ports with CDC drivers

Posted: Thu Apr 29, 2021 7:17 am
by Giovanni
Hi,

I never did that but it should be possible, in the USB callbacks you need to call the Serial_USB handlers or your "raw" handlers depending on the endpoint being handled.

Other source of potential problems is the device descriptor, that one is not exactly easy to get right.

Giovanni

Re: Three serial com ports with CDC drivers

Posted: Wed May 05, 2021 5:09 am
by sabdulqadir
Ok, got it to work, at least partially. No change in descriptors was needed so far.
Thanks for the help,
AQ