Two interface on USB CDC host

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Two interface on USB CDC host

1,864件の閲覧回数
SM_98
Contributor I

I am working on USB CDC host based application on RT1064 (SDK version 2.8.2). At present, USB CDC host is up and I am able to communicate with the USB device. The USB device provides 2 interfaces for data communication. In both interfaces data communication is working independently (That is the interface configured at the time works).

I need both the interfaces to work at the same time.

1. I could not find any example application for USB host that shows 2 or more host interface working at the same time. I saw this example https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Implementation-of-Dual-USB-Host-on-RT1060-EVK/ta... but it initializes two different USB instances with separate events and tasks.

2. How many maximum interfaces can be configured for USB CDC host in RT1064. I can see USB_HOST_CONFIG_CONFIGURATION_MAX_INTERFACE is configured as 20 and USB_HOST_CONFIG_INTERFACE_MAX_EP as 4, so does that mean 20 interfaces each with 4 end points can be used?

3. There is a composite USB device example in the SDK. As per my understanding of the code usb_cdc_vcom_struct_t is created for each interface in usb_device_composite_struct_t. So for host USB should I make a composite structure with multiple cdc_instance_struct_t. What other parameters it may need? I am still not sure how the USB_HostCdcDataInCallback, USB_HostCdcDataOutCallback, USB_HostCdcInterruptCallback and USB_HostCdcControlCallback will handle the data received and send to individual host interfaces.

Similar to USB device example if a sample example for multiple USB CDC host is available it will be easy to understand.

Thanks

0 件の賞賛
返信
1 返信

1,847件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @SM_98 ,

You can use the MCUxpresso Config Tools to create and add CDC interface. It's very easy. RT1064 OTG USB has up to 8 bidirectional endpoints, enough for two CDC interface.

jingpan_0-1639636262496.png

 

Regards,

Jing

 

0 件の賞賛
返信