Other Parts Discussed in Thread: TUSB320
I'm using TPS65987D to interact with an Android phone via a USB-C in 2 modes: UFP & DRP at 2 different scenarios. As the board does not have its own power source, the device is configured as UFP (dead battery mode) when it's first connected to an Android phone. It relies on the phone power to power on the board. When another external power source is applied, we want the TPS65987D to do a PD PR_Swap to source in order to act as a power source to the phone (i.e. charging the phone). The problem is, as soon as the swap occurs, there is little current going to the phone which causes it to output a message "device is slowly charging ..".
The following programming procedure was done prior to the swap:
Upon boot up (in dead battery mode) with power provided by the phone:
1. clear dead battery flag
2. write to Tx Src Capability reg
Upon another external power was applied:
3. write to Global Config reg
4. write to Port Config reg
5. write to Port Control reg
6. send command SWSr to phone to swap power (attempt to make the phone a sink and our board a source)
After step 3, the USB connection to phone is lost. After step 6, the power swap appears to take effect as the phone starts seeing signs of incoming charging as follows:
a) brief flashing screen and then charging icon show up
b) message prompts with "Device charging slowly .... for faster charging, use the charger that came with your phone. Make sure cable isn't damaged."
In reality, the USB connection is lost and the phone draws very little current. We measured the total consumption at the input where the external charge was applied, the current is only 150 mA (including the board and the phone, if it draws anything at all).
This behavior is not a lot different than what we expected. We would have expected that, after the power swap, the phone would become a sink while still maintaining data host (DFP) whereas our board would becomes a source while retaining data role as UFP, just like before the swap.
Can you please help pinpoint what went wrong with my set-up? I'm trying to attach App Custom Tool project that we based on to program the device. However, the site rejected it saying file type not permitted or mime type dose not match the file content. I'm now just sending a picture of the raw view instead.
Thank you in advance to help me to solve this issue.