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:
- 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.
- 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.
- 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