Part Number: TPS65987D
Other Parts Discussed in Thread: TPS65987
Hello,
I am having the same problem described in this post. The issue has been marked as resolved by the OP, but I’m unable to understand/reproduce their solution.
Steps:
- Using the Application Customization Tool (GUI Build Version: 6.1.1) create a new project, using the options below:
- TPS6587DDH
- Advanced
- Dual Role Port (DRP), prefers power source
- Under Port Control (0x29) enable “Initiate Swap to UFP”. Leave all other options set to the project template defaults
- Flash project/binary to device and cold boot
Upon connection to a test port partner (with requisite capabilities), a DR_Swap is performed (observed on PD protocol analyzer), such that the TPS6587 takes on the source power role and UFP data role.
This is the expected behavior.
If I go back to the Application Customization Tool, disable “Initiate Swap to UFP” and reflash, a DR_Swap is not automatically performed and the TPS6587 takes on the source power role and the DFP data role.
This is the expected behavior.
However, if at this point I issue a SWUF command, the task return code is 0x05 and no DR_Swap message is observed using a PD protocol analyzer. I have been unable to find any documentation for the 0x05 response code, although it’s clearly some sort of error. I am trying to figure out how to manually initiate a DR_Swap to UFP.
Additional thoughts, observations and info:
- The initial test, where the DR_Swap is successfully performed automatically suggests that all of the prerequisites for performing a DR_Swap are in place.
- The fact that no DR_Swap message is actually sent, upon executing the SWUF command, suggests that the error is not related to the test port partner.
- Immediately prior to executing the SWUF command, I can successfully execute the GSkC and GSrC commands, and verify that the port partner is DR_Swap capable (bit 25).
- Immediately prior to executing the SWUF command, I (defensively) execute the DBfg command, to ensure that dead battery flag is clear. I don’t think this matters for SWUF, but just in case.
- I have reviewed the SLVAEC3 Application Report which gives details on performing data role swaps. In particular, I have ensured that all of the requirements described in Table 1, under “Issue swap to UFP" have been met.
For my particular application, I need to be able to selectively perform a data role swap to UFP, depending on other conditions. Unfortunately, the automatic functionality provided by the “Initiate Swap to UFP" option in the Application Customization Tool is not appropriate for all cases in my application.
Any help in getting the SWUF command working would be greatly appreciated.
TIA