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.

CCS/TM4C123GH6PM: How to use HID Gamepad and Bulk mode concurrently?

Part Number: TM4C123GH6PM

Tool/software: Code Composer Studio

Hello, I am Sky.

I am using TM4C123 and trying to implement USB interface.

I can find each example for Bulk and HID interface separately,

(usb_dev_bulk, usb_dev_gamepad)

but  I don't know how to use both modes concurrently.

Please answer my question.

Thanks,

Regards,

Sky.

  • What you want to do is setup a composite device. This is described in section 2.9 of the TivaWare USB Library User's Guide. You can find that document in your TivaWare documentation folder. Mine is in: C:\ti\TivaWare_C_Series-2.1.4.178\docs\SW-TM4C-USBL-UG-2.1.4.178.pdf
  • Thanks Bob,

    I read the chapter 2.9 Composite Device Class Driver you mentioned.

    Previously, I thought there is a way to use Generic Bulk Class Driver and HID class Driver concurrently.

    Now, I realize that I should use "CDC Class Driver" to use interrupt and bulk mode concurrently.

    When I refer to the document you suggested, there is an example of two CDC serial ports.

    In my case, I want to implement a composition of (bulk and hid mode) or (bulk and serial port mode).

    So, I have to modify a setting value of tUSBDCompositeDevice as below, but I don't know which is an appropriate for my application.

    #define USB_PID_COMP_SERIAL 0x0007

    #define USB_PID_COMP_AUDIO_HID 0x0008

    #define USB_PID_COMP_HID_SER 0x0009

    #define USB_PID_COMP_HID_DFU 0x000A

    #define USB_PID_COMP_HID_HID 0x000D

    Moreover, if there is an example for bulk + hid mode or bulk + serial mode, please share a link.

    Regards,
    Sky.