Three serial com ports with CDC drivers

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

Three serial com ports with CDC drivers

Post 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
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Three serial com ports with CDC drivers

Post 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
User avatar
sabdulqadir
Posts: 49
Joined: Fri Mar 23, 2018 7:29 pm
Has thanked: 13 times
Been thanked: 4 times

Re: Three serial com ports with CDC drivers

Post by sabdulqadir »

Ok, got it to work, at least partially. No change in descriptors was needed so far.
Thanks for the help,
AQ
Post Reply