Other Parts Discussed in Thread: BQ25792, TPS65987
Hi,
I'm having some trouble getting power role swapping to work. I've tested with an LG and a Samsung device and neither are able to successfully role swap.
The Setup
I am using a TPS65987D alongside a BQ25792. The system is intended to be a dual-role PD device with a sink role preference. The TPS is connected to the BQ via its I2C3 master port. When operating as a sink, it configures IINDPM in accordance with the negotiated contract event and enables charging. In source mode, it configures VOTG, disables charging and enables the OTG bit. IOTG is 3A for all contracts.
The Problem
I can see the correct register writes taking place on I2C3 after the FRS event is triggered from the phone. However the role swap never completes. Below are a CSV dump of the CC line activity, as well as the voltage waveforms for VBUS, PP_HV, and CC.
VBUS in the context of CC
VBUS in the context of PP_HV (common net between the TPS65987D and BQ25792's VAC1/2/VBUS, which are all shorted on this design).
To my untrained eye, it looks like the TPS65987 switches are taking too long to close. PP_HV is ready relatively quickly - that is the BQ25792 bridge direction reverses to be a source. However 5V doesn't appear on VBUS again until over 1 second later. Looking at it closely it looks like what the eventual rising edge on VBUS corresponds to, is actually the phone reverting back to being a source. That's the only thing that explains why there's a slight sharp jump in voltage on PP_HV shortly after the rising edge on VBUS.
So the question is, why is the TPS not closing the switch shortly after the rising edge on PP_HV? It's clear the FRS even is being properly generated. Otherwise you wouldn't see PP_HV rise at all, which corresponds to the BQ25792 being told to switch into OTG mode via I2C.
I've attached my project file, which contains all of the config, as well as the I2C commands sent to the BQ25792 on various event triggers.