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.

TPS65987D: SWUF fails with task return code 0x05

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

  • Hello,

    The host interface technical reference manual is used in a situation like this. The datasheet and TRM are the two documents you use to evaluate the TPS65987D.

    https://www.ti.com/lit/ug/slvubh2b/slvubh2b.pdf?&ts=1590006597605 

    As far as the SWUF command, the PD controller will not send a DR swap to UFP if it already acting as a UFP. You would use this command if you are acting as a DFP and want the system to become a UFP. 

    If the initiate Swap to UFP" option in the Application Customization Tool is not appropriate for all cases in your application then do not select it. On the other hand you can leave this option selected so that the TPS65987D will always become the UFP, and in situations where you want it to become a DFP, you can issue the SWDF command.

  • Hi Adam,

    The host interface technical reference manual is used in a situation like this. The datasheet and TRM are the two documents you use to evaluate the TPS65987D.

    I have been referring to both of these documents, as well as the SLVAEC3 Application Report.

    As far as the SWUF command, the PD controller will not send a DR swap to UFP if it already acting as a UFP. You would use this command if you are acting as a DFP and want the system to become a UFP.

    This is the situation I described in my second example, where the "Initiate Swap to UFP" option in the Application Customization tool is disabled. Since the  TPS65987D does not perform the DR_Swap automatically, upon connection to the port partner, the PD controller is acting as a DFP, as required. This is how I would like to configuring things for my application. Under some circumstances, I would like my application to be able to issue the SWUF command, in order to perform the role swap. Under other circumstances, I would like the PD controller to remain acting as a DFP (the default), in which case the SWUF command would not be issued. In my application, TPS65987D is connected to a micro-controller which uses logic to determine whether or not issuing the SWUF command is appropriate, depending on external conditions.

    If the initiate Swap to UFP" option in the Application Customization Tool is not appropriate for all cases in your application then do not select it.

    The first example I gave, where the "Initiate Swap to UFP" option is selected, was merely to demonstrate that a DR_Swap to UFP is possible. It is supported by the test port partner and is not in conflict with any of the other programmed settings. But automatically performing a DR_Swap to UFP, under all circumstances, is not appropriate for my application. Under some circumstances, compatible port partners will not be capable of port swapping.

    On the other hand you can leave this option selected so that the TPS65987D will always become the UFP, and in situations where you want it to become a DFP, you can issue the SWDF command.

    Unfortunately this strategy will not work for my application, as some port partners I'm expecting to connect to will not be capable of role swapping. In these situations, the TPS65987D acting as a DFP is appropriate.

    Is there any documentation that describes the meaning of the 0x05 task result code that is being returned? Maybe this could give some clues to why the TPS65987 is not sending a DR_Swap command when the SWUF command is issued.

    Any help in getting the SWUF command to work would be greatly appreciated.

    Thanks,
    Shea

  • Hello,

    Let me test this command myself. I will be going to the lab on Friday and can give you an update then

  • Thanks, Adam.

    I appreciate you looking into this.

    Best,

    Shea

  • Hello Shea,

    I tested this command on an EVM last week, and it seemed to work as expected. Recommend that you make sure you are using the most recent configuration tool and that the EVM is not being loaded from a dead battery configuration