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: usblib composite device

Part Number: TM4C123GH6PM

Tool/software: Code Composer Studio

Hi there,

again i need your help regarding composite device development using tivaWare 2.1.4.178.

I used the usblib for a while now, applying the windows compatibility changes from here:

Now, the project is growing and i need another few pipes to the microcontroller, basically for piping USB/Serial to UART(and hence other uCs).

So what is working is:

using 4 Devices to the Microcontroller

What is not working:

using 6 Devices to the Microcontroller (Somewhere it says a max of 8 devices should be okay?)

Devices are 2x Bulk and 2/4x CDC

The issue is:

when using the 6 Device Setup, sending more than 8 bytes in a single USB Packet, this single Device does not respond anymore. The others do. No Error/Fault/__error__ is risen.

I validated this for all of the Serial Devices (using another TivaC Launchpad as UART->USB converter). And the Devices that will be handled within the Microcontroller,

This is only true for the USB OUT Endpoint, sending longer messages from the uC to the PC works as expected.

In usbdenum_mod3.c MAP_USBIntStatusEndpoint(USB0_BASE) always returns a zero, when using the longer messages, not when using the shorter ones.

So... why is this happening? and What is happening? And how can i resolve this one?

thank you for helping me!

(why do the pasted urls resolve to huge pictures?!)

  • Okay, sry, my bad.

    MAX_USB_DEVICES in usblib.h states 5 Devices.

    So i changed my Setup to only having 5 Devices, but the problem persists.

    Decreasing it to 4 again (initializing only 4 Rx/Tx Buffers and connecting the Devices to the Composite instance) makes all of this work again.

  • Hello Oliver,

    I think the name for the MAX_USB_DEVICES definition of 5 is slightly misleading as the comment describes the following:

    //*****************************************************************************
    //
    // This is the maximum number of devices we can support when in host mode and
    // using a hub.  By default, we support up to 4 devices (plus 1 internally for
    // the hub itself).
    //
    //*****************************************************************************

    Based on this, you can only support 4 external devices, so you'd have to do something like 2x bulk and 2x CDC.

    Also in addition to that, the usblib only supports 8 endpoints, so that is another point to keep in mind as well (it's not clear how many endpoints you are using).