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.

TUSB422: UFP mode is stuck during initialization phase

Part Number: TUSB422


Hello,

we have designed a board using TUSB422 for usb-c power delivery and following your schematic.

We are using a microcontroller to run your reference firmware code, but unfortunately we are not able to go through the whole sequence in order to get usb-c interface correctly detected by the host (PC).

The main phases of your Finite State Machine are the following ones on startup:

alert register 0, value 0x03
current_state, pe_snk_startup
current_state, pe_snk_discovery
current_state, PE_SNK_WAIT_FOR_CAPS
alert register 0, value 0x82
current_state, PE_SNK_HARD_RESET

After that we will never receive any interrupt from host and the main loop will run forever waiting for any event (but no other event arrives).

It looks like there is an issue related with the high current, however when measured the current is below 100mA.

We only provide power from the usb-c cable.

I can write down a block diagram of our configuration, in order to make thing more clear:

PC -> usb-c cable -> CUSTOM_BOARD with TUSB422

CUSTOM_BOARD has a microcontroller where your reference firmware code runs and the TUSB422 chip, no external power on it

This configuration should be enough for the usb-c PD protocol, but since it times out waiting for capabilities, and then there is a hard reset, our board looses power and resets.

Can you give me few advise on how to solve this issue?

Is this behavior expected?

We have tried with different ufp configurations, either the one in the reference software and the attached one, none of them works and they system timeouts after waiting for capabilities.

  • Here there is our UFP configuration:

    ---------------------------------------------------
    #define PORT0 0
    #define PDO1 0
    #define PDO2 1

    #define USB_VID 0x0451
    #define USB_PID 0x0422
    #define USB_BCD_DEVICE 0x0 /* device-defined revision number */

    const tcpc_config_t typec_config[NUM_TCPC_DEVICES] =
    {
    [PORT0].intf = SMBUS_MASTER0,
    [PORT0].slave_addr = TUSB422_SLAVE_ADDR_NC,
    [PORT0].flags = TC_FLAGS_TRY_SNK,
    [PORT0].role = ROLE_SNK,
    [PORT0].rp_val = RP_HIGH_CURRENT,
    };

    const usb_pd_port_config_t pd_config[NUM_TCPC_DEVICES] =
    {
    [PORT0].usb_comm_capable = true,
    [PORT0].usb_suspend_supported = false,
    [PORT0].externally_powered = false,
    [PORT0].dual_role_data = false,
    [PORT0].unchunked_msg_support = false, /* Always false for TUSB422 */

    [PORT0].num_src_pdos = 0,
    [PORT0].num_snk_pdos = 1,
    /* vSafe5V Sink PDO */
    [PORT0].snk_caps[PDO1].SupplyType = SUPPLY_TYPE_FIXED,
    [PORT0].snk_caps[PDO1].MinV = PDO_VOLT(5000),
    [PORT0].snk_caps[PDO1].MaxV = 0, /* N/A */
    [PORT0].snk_caps[PDO1].MaxOperatingCurrent = PDO_CURR(3000),
    [PORT0].snk_caps[PDO1].MinOperatingCurrent = PDO_CURR(100),
    [PORT0].snk_caps[PDO1].OperationalCurrent = PDO_CURR(3000),
    [PORT0].snk_caps[PDO1].MaxOperatingPower = 0, /* N/A */
    [PORT0].snk_caps[PDO1].MinOperatingPower = 0, /* N/A */
    [PORT0].snk_caps[PDO1].OperationalPower = 0, /* N/A */

    [PORT0].higher_capability = false,
    [PORT0].giveback_flag = false,
    [PORT0].no_usb_suspend = true,
    [PORT0].fast_role_swap_support = FR_SWAP_NOT_SUPPORTED,
    [PORT0].pdo_priority = PRIORITY_VOLTAGE,

    [PORT0].auto_accept_swap_to_dfp = false,
    [PORT0].auto_accept_swap_to_ufp = false,
    [PORT0].auto_accept_swap_to_source = false,
    [PORT0].auto_accept_swap_to_sink = false,
    [PORT0].auto_accept_vconn_swap = false,

    [PORT0].multi_function_preferred = true,
    [PORT0].ufp_alt_mode_entry_timeout_enable = true,
    [PORT0].id_header_vdo = (0x6C000000 + USB_VID),
    [PORT0].cert_stat_vdo = 0,
    [PORT0].product_vdo = ((uint32_t)USB_PID << 16) | USB_BCD_DEVICE,

    [PORT0].num_product_type_vdos = 1,
    [PORT0].product_type_vdos[0] = 0xB100001B,
    [PORT0].product_type_vdos[1] = 0,
    [PORT0].product_type_vdos[2] = 0,
    [PORT0].num_svids = 1,
    [PORT0].svids[0] = 0xFF01,
    [PORT0].svids[1] = 0,
    [PORT0].svids[2] = 0,
    [PORT0].modes[0] = 0x080845,
    [PORT0].modes[1] = 0,
    [PORT0].modes[2] = 0,
    };
    ------------

    Can you spot any mistake in this configuration?
  • will assign to right person
  • Very good, waiting for your feedback.


    In the mean time let me give you more details:

    - our i2c interface runs with 1 MHz clock (i2c interface works fine and we can see data on the CC lines)

    - we are using TUSB422 as UFP

    - we are planning to enable Alternate Mode

    - we would like to get Display Port and usb3 available after the Power Delivery protocol exchange

    - we are planning to use a microcontroller without external power, Vbus coming from the usb-c is the main one. [if we send the hard_reset message it doesn't work because the power low]

    Hope it will help to understand our scenario.


    Can you help us to sort out this problem?

  • Morning,

    Thanks for coming back to me.

    Do you guys have any news about that?

    I you require more details, please let me know.

  • After connecting Type-C cable, what is the voltage on TUSB422's VBUSIN, CC1, and CC2 pins?

  • vbusin = 5V
    cc1 is in the range of 0 to 200 mV
    cc2 is in the range of 1.6 to 1.8V
  • 200mV seems high for unused CC pin. It should always be near GND. If you flip the orientation of USB-C cable, does voltage on CC1 and CC2 swap?
  • while experimenting,
    we have edited the TI library and we have changed from HARD_RESET to SOFT_RESET command (after PE_SNK_WAIT_FOR_CAPS timeout).
    But it did not change much.

    Any suggestion?
  • Hi,

    does the microcontroller software work using UFP Alternate Mode?

  • Hi,

    Is this the reference design you are using?  

    USB-C™ to DisplayPort Active Cable Reference Design

    If not, could you please tell me what reference design you are using?  This will help me determine what MCU code is appropriate for your application.

    Also, could you send me your current MCU code in a zip file?

    Thanks,

  • Yes,
    I am using that reference design.

    Using a USB-c PD sniffer I have been able to fix most of my issues with that.

    Thanks for your support