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.

TUSB2036: Check If Chip Is Actively Providing Power To Downstream Connection

Part Number: TUSB2036

I've been tasked with a project at work that is fairly outside my scope of knowledge and hoping others might have any potential advice.

  1. Is it possible to communicate with a TUSB2036 USB chip to poll if a port is actively providing a charge to a downstream connection (a wireless charger in this example)? We are hoping to detect when the wireless charger begins pulling a charge and run some logic when that is detected.

  2. When I utilize libusb (technically gousb as we are a Go shop) to communicate with the chip, I can send a few Control commands and Read commands, but not Write commands. The documentation indicates that it should support Write commands. Does this mean the custom board that the chip is integrated into was improperly set up?

    1. Additionally, is there a list of byte commands that can be run successfully with the TUSB2036 device? I have referenced these links: Microchip Developer Help and the TUSB2036 Data Sheet, but many of these commands simply return a `pipe error -9` when issued.
      1. Using Go and gousb, the only successful communication I have found so far is:
        // Allocate a byte slice to receive the hub status
        data := make([]byte, 64)
        
        // Send a control command
        numBytes, err := dev.Control(0xA0, 0x06, 0x00, 0x00, data)
        if err != nil {
            panic(err)
        }
        
        // Data returns a slice of: 9,41,3,13,0,0,100,14,14
        // I am unsure what these values correspond to and have struggled to locate a resource to help me parse it.

I have a custom board that has some integrated USB chips on it (TUSB2036 from Texas Instruments). Each chip then connects to a three USB-C's that connects to a wireless charging board (we're testing a few different models). My background is coding in Golang, and I have no experience with circuitry.

  • A hub can switch off the power to a downstream device (the /PWRONx outputs are designed to control external power switches), but it cannot measure how much power is actually drawn (except when the power switch triggers the overcurrent signal). In other words, the hub itself cannot determine whether the charger is connected but idle.

    The commands that can be sent to a hub are defined in the USB 2.0 specification; see section 9.4 for standard device requests, and section 11.24 for hub requests.
    (0xA0, 0x06 is a GetHubDescriptor request; see section 11.23.2.1 for the descriptor fields.)

    If the charging boards have a USB device, you might be able to ask them for their status.

  • Thanks for the quick and helpful response.

    Just to help close this out, I can read from the TUSB2036 chip, but I receive a `pipe error (-9)` when I attempt to write to it or issue control commands. Would this potentially indicate an issue with the traces on our custom board, or would that be related to a setting within the TUSB2036 chip itself?

  • Hi,

    Do you have a USB protocol analyzer that can capture the USB traffic between the hub and the downstream device? I believe the pipe error is related to the error when the hub is doing a data transfer to the device and it will be helpful to have a capture of the error data transfer using the analyzer to further narrow down the root cause.

    Thanks

    David 

  • The TUSB2036 will return an error for any invalid command. Please show an example.