Page 1 of 1

Triple USB-CDC (on STM32F072)

Posted: Sat Nov 11, 2017 10:04 am
by Ilfirin
Hello,

Looking into the reference, STM32F072 has 8 endpoints, which could lead to three CDC devices (with one endpoint free), which is tempting.

I took USB_CDC_IAD demo from testhal/STM32F3xx and it's working fine, as far I could tell (did just quick tests), so full of optimism, I tried to fiddle (without much idea, what am I doing) with usbcfg.c to add third one.

I could post my usbcfg, but I know, it's not right. Easy part was adding endpoints and SDU3, usbcfg3.. everywhere, according to previous configs. What I guess is problem, is that usb descriptor needs modification, which I need to look into more.

Just want to ask, at the first, if you think it's possible, or have you it working somewhere.
If Google not failed me, it looks like no one used (with ChibiOS) more then two cdc_s so no working code to steal learn from.

Thank you

Re: Triple USB-CDC (on STM32F072)

Posted: Sat Nov 11, 2017 5:09 pm
by Giovanni
Hi,

Yes, descriptors are the hard part, I made the IAD demo using material posted on ST forums, then created the system of macros you can see now.

Giovanni