This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1231C3PM: USB Host - handle composite device

Part Number: TM4C1231C3PM
Other Parts Discussed in Thread: EK-TM4C1294XL

Hi,

I intend to use the Usblib in host mode (with TM4C123).

The peripheral which will be connected to my device is a composite device, containing an MSD and a serial device. 

The usblib offers API for HID-Class and Mass-Storage-Class. Is it even possible to communicate to a composite device? Do i need to implement a custom host class driver?

Thanks for your help

Kind regards,

Sandro

  • The usblib offers API for HID-Class and Mass-Storage-Class. Is it even possible to communicate to a composite device? Do i need to implement a custom host class driver?

    Hi Sandro,

      Yes, I think you will need to implement a custom host class driver to support composite devices. For USB device mode, we do have some examples for composite devices that you may reference. For example, C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\usb_dev_cserial is a composite USB device mode with two CDC classes. 

  • Hi Charles

    Thanks for your quick reply.

    In my current implementation I initialize the Host Class Driver with an CDC Class Driver and an MSC Class Driver.

    So far I tried to connect a composite device (including an MSD and a CDC device) to my host device.

    The MSD gets detected, but the CDC is ignored. So somehow the library seems to detect that there is a device present.

    When I connect a CDC device only to my host device it gets detected and I am able to communicate.

    The only thing I am missing is to have the MSD and the CDC detected simultaneously.

    Do you have any examples for USB Host mode with handling of composite devices?

    Might it be possible to use the Hub Class Driver, which supports multiple devices?

    BR,

    Sandro

  • Do you have any examples for USB Host mode with handling of composite devices?

    Might it be possible to use the Hub Class Driver, which supports multiple devices?

    Hi Sandro,

      As I mentioned in the first reply, we don't have any examples for USB host mode with handling of composite devices. The only host mode examples in TivaWare library we have are as follows. These are for TM4C129 MCU. However, you can port it to TM4C123. 

    There is a app note for TM4C123 with host mode examples but it is for single class device, not composite device. 

    https://www.ti.com/lit/pdf/spna243

  • Hi Charles,

    Thank you for your answer.

    I am trying to implement USB host mode with the hub class. The hub gets detected, but the attached devices (also single devices like an USB-Stick) are not detected, but I'm getting USB_EVENT_UNKNOWN_DETECTED for each device connected to the USB hub, when connecting the hub to my device.

    What could it be that I am missing? My code is based on the usb_host_hub example which is provided with the Tivaware C-Series Library.

    BR,

    Sandro

  • I could figure it out, i forgot to enlarge the size of the HCD-Pool. But still only the MSD gets detected when connecting the composite device to my device over an USB hub.

    Could you give me a hint how to build an custom usb host driver for an composite device?

  • I could figure it out, i forgot to enlarge the size of the HCD-Pool. But still only the MSD gets detected when connecting the composite device to my device over an USB hub

    Glad that you are making progress.

    Could you give me a hint how to build an custom usb host driver for an composite device?

    I wish I could provide some hints but I'm not a USB library expert. My best recommendation is for you to look at how the composite device is supported for USB device mode. Somehow a custom library needs to be able to interpret a composite device descriptor.