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.

TPS65982: Power Source Selection

Part Number: TPS65982

Hi Team,

My board has both a USB-C port controlled by a TPS65982 and a barrel jack. There is a small microcontroller (the Power Controller or PC) which is responsible for deciding which power source to use and configuring the battery charger for the correct charge power based on what is available. The setup is similar to the Dual-Port Notebook Application shown in the TPS65982 datasheet except with only one TPS65982.

 

 

I am writing the software for the Power Controller (System Controller in the above diagram) and I’m trying to understand the correct way to interface with the TPS65982. I think I want to configure the PP_EXT path for ‘input, wait for SYS_RDY’ so that the TPS65982 does not enable the PP_EXT path automatically, in case the barrel jack is also plugged in. The software waits for a PowerStatusUpdate event to indicate that there might be power available. If the Type-C Current field in the Power Status (0x3F) register indicates that a PD contract has been negotiated, the software will then read the Active Contract PDO (0x34) register to determine how much power is available. Finally, the software will issue the SRDY command to close the PP_EXT switch and enable the battery charger.

A few questions:

  1. Is the flow above correct? Is there a document somewhere with some better instructions on the ‘correct’ flow? I’ve come up with this based on the USB PD Power Negotiations App Note (SLVA842), the Datasheet, Firmware User’s Guide, and Host Interface Technical Reference Manual.
  2. The Active Contract PDO register says that it contains “Contents of PDO Requested by PD Controller as Sink and Accepted by Source, once it is Accepted by Source.” However, according to the USB PD Power Negotiations App Note (SLVA842) after the source accepts the RDO it will transition the power supply and send a PS_RDY message when the power is ready (page 10). Is the active contract PDO register updated when the Accept message is received or the PS_RDY message? If it is updated when the Accept message is received how do I know when PS_RDY is received? I’m assuming I should not attempt to begin charging until the source sends the PS_RDY message.
  3. I think it would be best to stop attempting to negotiate up to 100W when the barrel jack is plugged in, what is the best way to do this? Is this what the “externally powered” bit in the control register is for? What does that bit do exactly?

Let me konw if you need any further clarifications to help answer my questions.

Regards,
Hayden

  • Hi Hayden,

    You could use the Barrel Jack Detect GPIO event on the TPS65982 to accomplish this. From the diagram above, there is a net named "DC Barrel Jack Sense" you could connect that net to a GPIO on the TPS65982 and configure it to Barrel jack detect. When the TPS65982 detects the barrel jack, it will stop sinking power if there is a PD adapter connected to the Type-C port. It will also clear the dead battery flag if it was set. Finally, it will attempt to do a power role swap to source if the port role was previously a sink.
    This should work well in your application without requiring too much from the EC.

    Thank you,
    Eric
  • Hi Eric,
    I originally posed this question to Hayden.

    The above description was a bit of a simplification. There is actually a third power source, POE. There is no fixed priority between POE/USB-C, the product should use which ever one has more power available. The EC can determine how much power is available from POE and decide which power source to use, so I would like to control the TPS65982 from the EC based on that information. I am also extremely IO constrained on the EC, so I don't think I can drive the barrel jack detect directly from the EC.

    Can I use the externally powered bit in the control register to have a similar effect as Barrel Jack Detect? What exactly does that bit do? The documentation doesn't provide a detailed explanation of the effects of setting it to one.

    I think that I would like to control the closing of the PP_EXT switch so that the EC can ensure that two power sources will never be connected to the battery charger VIN at the same time. Is the flow described above correct?

    Do you have an answer to question 2 above?

    Thanks,
    Theo
  • Hi Theo,

    setting the externally powered bit to 1 would have the same affect as enabling the barrel jack detect GPIO.
    If you simply want to control when PP_EXT is closed, you can do this by setting the switch to "input, wait for SYS_RDY" as you had mentioned above and sending the SYS_RDY command when the conditions for charging over Type-C have been met.

    Thank you,
    Eric
  • What exactly does the externally powered bit do? I read in another thread that if the 'never sink if externally powered' is also set the TPS65982 will not close any input switches while the externally powered bit is set. But what else does it do? Does it change the advertised sink capabilities? To What? Anything else? What about my other questions above?

    Theo
  • Hi Theo,

    Apologies for the confusion, the externally powered bit indicates to the TPS65982 that there is a power source available outside of VBUS. This would be valid if there is a 3.3V supply providing VIN_3V3 of the 82. The externally powered bit will not change the sink capabilities. The externally powered bit will still allow you to close sink paths unless you enable "never sink if externally powered"

    For question 2 above, the Active Contract RDO register will update after the PS_Ready message has been received from the Source. It is safe to start drawing current from the source after PS_Ready has been received.

    If you do not want to negotiate 100W while the barrel jack is connected, you can change the Sink Capabilities through your EC when the barrel jack is connected/ disconnected.

    Thank you,
    Eric