eclipse-threadx / usbx

Eclipse ThreadX - USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with Eclipse ThreadX RTOS
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/usbx/index.md
MIT License
157 stars 91 forks source link

USBX-Device: ACM-CDC dual #166

Open ModicaPaolo opened 4 months ago

ModicaPaolo commented 4 months ago

Hello,

1) Is it possible to use the USBX stack to expose two ACM-CDC under the same USB? 2) Is it necessary to register the ACM-CDC class twice under a composite device, or is there a way to show two virtual CDCs under the same class? 3) I am using USBX and ThreadX on an STM32U575CGU and have successfully implemented a single ACM-CDC. However, I cannot find a way to implement two ACM-CDC instances. If this feature is not currently supported, is it planned to be added in the future?

Thank you.

ayedm1 commented 4 months ago

Hi @ModicaPaolo

Yes usbx support composite dual cdc acm 1- Update the device descriptor with two cdc acm interface 2- Register two cdc acm class 3- don't forget to configure USB fifo.

For the init of application or the device descriptor you can refer to nxp example maybe it can help you:

https://github.com/nxp-mcuxpresso/mcux-sdk-examples/blob/main/evkmimxrt1015/azure_rtos_examples/usbx_device_composite_cdc_acm_cdc_acm/usbx_device_composite_cdc_acm_cdc_acm.c