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/TUSB320HAI: TUSB320HAI role configuration and attached detection

Part Number: TUSB320HAI
Other Parts Discussed in Thread: BQ25883, TUSB320

Tool/software: Code Composer Studio

Hi team,

Sorry to bother you!

I am using TUSB320HAI with BQ25883 charger to desgin charge out feature, now I met some issue as below need yours help.

1. After init. tusb320 and bq25883, I read below registers via i2c:

CURRENT_MODE_ADVERTISE=00

CURRENT_MODE_DETECT=00

ACTIVE_CABLE_DETECTION=0

ATTACHED_STATE=00

MODE_SELECT=00

2. When I connected to a charger(5V/3A), those registers updated as below

CURRENT_MODE_ADVERTISE=00

CURRENT_MODE_DETECT=00

ACTIVE_CABLE_DETECTION=0

ATTACHED_STATE=10(Attached.SNK (UFP))??I think tusb320 should be as sink and (Attached.SRC (DFP)) if connected with a charge to charge in.

MODE_SELECT=00

3. When I connected to a mobile phone, those registers are updated as below. 

CURRENT_MODE_ADVERTISE=00

CURRENT_MODE_DETECT=01

ACTIVE_CABLE_DETECTION=0

ATTACHED_STATE=10(Attached.SNK (UFP))

MODE_SELECT=00

Why acble detection and mode select always are 00, and why attached state always 10(Attached.SNK (UFP)) no matter connect to charger and mobile phone.

When tusb320 connect to mobile phone, BQ25883 enable OTG, charge out config as 5V/1A, but can not charge out.

Besides, I found MODE_SELECT is unconfigurable.

Thanks a lot.

Wayne

  • Hi,

    How do you have the Port pin configure on your board? If the port pin is pulled down. Then TUSB320 will always try to connect as a UFP. In addition, if you are wanting to "charge in" then UFP is the type of port you would want. Remember that a UFP is a power consumer in the Type-C environment without any power role swap (PD controller required). 

    Active cable detection will only update when in DFP or DRP modes and is not generic cable/device detection.  Generic cable/device detection.is reported by the ID pin not ACTIVE_CABLE_DETECTION.

    CURRENT_MODE_ADVERTISE should be written to in order to change the advertised current mode. This register is only relevant in Attached.SRC mode where your application is providing power not consuming.

    Could you capture DP and DM with Vbus when phone is connected?

  • Hi Malik,

    Thanks your quick reply.

    The Port Pin on board is pulled down.  If I need support both UFP and DFP mode, we need configure PORT to NC?

    For the role, I mean the attached detection. Example, if connected a charger, TUSB320 should be detected Attached.SRC, and if connect a mobile iphone, it should detected Attached.SNK, right?

    I try to capture DP and DM when phone is connected, but didn't saw any signal, and Vbus is 1.4V.

    Thanks a lot,

    Wayne

  • Hi Wayne,

    Help me understand your application more, when do you need to support UFP and DFP? What is you application specifically? Fro your previous messages I see you are trying to charge from a power bank and sink data from a mobile phone, correct? First remember that DFP (SRC) will be a power provider or "charge out" case and UFP (SNK) will be a power consumer or "charge in" case with respect to your device. In the power bank case you will be most likely be a UFP or Attached.SNK to consume power from the power bank. If you do not plan to provide power to the mobile phone while sinking data then you could also connect as a UFP or Attached.SNK to sink data. If you do plan to provide power to the mobile phone while sinking data then you will need to us a PD controller to initiate a power role swap through Power Delivery messaging.  

    In short, you may only need to support UFP depending on the desired implementation however NC on the PORT pin will also allow you to support DRP which depending on the connected will configure its self as a UFP or DFP.

    Does Vbus always stay at 1.4V? Does the mobile phone never see your device? If the your device should connect as a UFP then the phone should provide Vbus. Have you tried multiple phones?

  • Hi Malik,

    Sorry for confuse you.
    I don't need sink data from mobile phone. I just need charge from a power bank(Charge in) and provide power to the mobile phone(Charge out).
    Now, "charge in" is ok, and would like to provide power to mobile phone, but it doesn't work.
    I just want to using TUSB320 to detect what is connected to TUSB320? Is a power bank or like mobile phone device? Then I can using BQ25883 to configure charge from a power bank or provide power to mobile phone.
    when I connected a mobile phone, vbus is stay at 1.4V. When I connected a power bank, it can up to 4.5V or above and "charge in" .

    Thanks a lot,
    Wayne

  • Hi Wayne,

    TUSB320 can also perform this function. There is no actual need to support BC1.2 because TUSB320 can present 1.5A or 3A charging capability in Type-C to Type-C application. BC 1.2 is only for legacy or micro-B phones. Could you explain or provide a schematic on how you are using TUSB320 to control BQ25883? I would also like to review to ensure everything is connected correctly. 

  • Hi Malik,

    We are using a MCU STM32 to control TUSB320 and BQ25883 via I2C.

    My desgin is if TUSB320 can detect the connected device type is power bank or mobile phone, and ST MCU can read this detection via I2C register, then I can using ST MCU to configure BQ25883 need "charge out" or "charge in".

    But now "charge out" doesn't work, how can I do that? Could you please advice, thanks.

  • Hi,

    How are you configuring BQ25883 over I2C under the two cases:

    • Charge out
    • Charge in

    Are you sure that the phone you are using has BC1.2 enabled?

  • Hi Malik,

    BC1.2 is enabled in phone.

    charge our: configure BQ25883 i2c register 06h bit7 EN_OTG set 1 and bit3 EN_CHG set 0.

    charge in: configure BQ25883 i2c register 06h bit7 EN_OTG set 0 and bit3 EN_CHG set 1.

    Any problem about the setting.

  • Hi Malik,

    could you please give some advice on this issue?

    Wayne

  • Hi Wayne,

    Sorry for the delayed response, I am still looking into possible causes for this issue and hope you get back to your by the end of today. 

  • Hi Wanye,

    Sorry for the extremely long delay in reply. Are you still experiencing issues with BQ25883? Your I2C settings seem to be correct. 

  • Yes, could you have any advice about this issue?

  • Hi Wayne,

    In your testing what is the Vbat voltage, in both charge in and charge out case? Can you post a schematic that can be reviewed? I will have a engineer for BQ25883 review your issue. I am engineer for TUSB320 which seems to be working okay.

    In the meantime, please see the linked post below as they may help with your issue:

    https://e2e.ti.com/support/power-management/f/196/t/849874

    Note: There is a US Holiday on 11/28 & 11/29, responses will be delayed. 

  • Hi Wayne,

     Below is required for OTG mode:

    1. BAT above VOTG_BAT

    2. VBUS less than VVBUS_PRESENT

    3. ADC is enabled

    4. Buck mode operation is enabled (EN_OTG = 1 and EN_CHG = 0)

    5. Voltage at TS (thermistor) pin is within range configured by Buck Mode Temperature Monitor as configured by BHOT and BCOLD register bits

    6. After 30 ms delay from buck mode enable

    When you enable OTG, is there a square-ish waveform at SW node?  Is there a voltage at VBUS? 

    What is the load at power up?  What is the OTG current limit setting?  If the load at power up is too large or is larger than OTG current limit after power up, the buck OTG output may crash.

    Regards,
    Jeff

  • Hi Malik,

    schematic as attached, please review.

  • Hi Jeff,

    Thanks your reply.

    The condition of OTG mode are met.

    OTG current limit is 1000mA. I will try the powr up load's influence.

    Wayne

  • Hi Wayne,

    We haven’t heard back from you. We are assuming you were able to resolve your issue. If not, just post a reply below or create a new thread if the thread has locked due to time-out.