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: Data role changing during power role swap

Part Number: TPS65987D

Hi,

We have a design that is essentially a USB hub as shown in the attached block diagram. The essential behaviour required is:

o The upstream facing port is permanently connected to a battery powered Host via a captive cable. The Host is always required to be a DFP.
o The two downstream facing ports have identical functionality and can be either connected to a USB-PD power adaptor (like an Apple 65W USB-C power adaptor) or to a USB Mass Storage device like a USB3.1 SSD drive.

The normal use case is that:

o A USB-C power adaptor is plugged into DS1 which powers the hub and charges the Host while the Host (always as a DFP) has USB data connectivity to the USB Mass Storage device.
o If the USB-C power adaptor loses mains power, or its USB-C cable is unplugged from the hub, the Host is required to do a Fast Role Swap to switch from charging to sourcing 5V@3A to maintain power to the hub and also maintain uninterrupted USB data connectivity with the USB Mass Storage device.
o When mains power is restored to the USB-C power adaptor, or its USB-C cable is plugged back into the DS1 port, the Host should swap back to being charged while it maintains uninterrupted USB data connectivity with the USB Mass Storage device.


The issue I am seeing is that when the USB power adaptor is attached, the correct behaviour is normally seen with the Host swapping to being charged and the data connectivity of the Host to the USB Mass Storage device is maintained uninterrupted. However, sometimes it gets into a state where incorrect behaviour is seen with the data connectivity from Host to USB Mass Storage device is lost when the Host swaps to being charged and then the USB Mass Storage device re-mounts automatically a couple of seconds later. It seems to remain in this odd state but if a "PD Hard Reset" 4CC command is issued to the Host PD Controller via I2C, the normal behaviour is restored.

Unfortunately, if I put a PD protocol analyser (a Lecroy T2P) in between the Host and its PC controller, it seems to change the behaviour itself, so I am unable to check what PD messaging is going on to try and debug the issue.

I have attached a scope screenshot of the "correct" behaviour and one of the "incorrect" behaviour. I have also attached the TPS65987D Application Customisation Tool project file for the Host PD controller.

There appears to be no issue with continuity of power for the hub and muxes in the USB data paths so I suspect that the Host is temporarily switching data role from being a DFP to a UFP when the power role swap from source to sink occurs.

So any advice would be much appreciated on:

o Is there anything in the power architecture or use of TPS65987D power path switches shown in the block diagram that could be an issue?
o Are the project customisation settings correct to achieve the desired behaviour for keeping the Host as a DFP data role while the power role swaps from being a source to a sink for charging?

ThanksPD Hub block diagram.pdf  TPS65987D Host config.pjt

  • Conner,

    Many thanks for the feedback. The .pjt file you've edited was created specifically for experimentation with the EVM. We have a separate .pjt file that we use with our custom hardware (very similar configuration - different PDOs, GPIO config. etc.) - I can send this file to you to modify or I can modify myself if you are able to provide instruction? Do you believe this is the final fix or is further analysis required? I'm currently having a problem with the E2E file upload feature (hence no .bin attached to previous post).

    Many thanks,

    David

  • Could you email me the file to modify? It requires the modification of a non-user configurable field. However, you will still be able to make any further changes you need, once I send it back.

    As far as whether or not this fix is sufficient long term, I'm conversing with my boss on the issue and will let you know. However, from the knowledge I have now, I think this will likely be sufficient for a permanent fix.

    Kind regards,

    Conner Gillette

  • Many thanks Conner - files e-mailed as requested.

    Best regards,

    David

  • Would you mind also confirming that the TPS65987D device you are using on your design is the TPS65987DDH?

    -Conner

  • Sorry David, you can ignore my previous question. I'll get you that modified project file ASAP.

    -Conner

  • Good Afternoon David,

    I have sent the corrected pjt file to you via email. 

    After speaking with my boss and our firmware expert, this fix is sufficient as a permanent solution to your problem. I am going to mark this thread as solved, however if you do experience further issues related to this, please feel free to reopen the thread.

    Thank you for your patience throughout this, I appreciate it.

    Kind regards,

    Conner Gillette

  • Hello Connor,

    I combed through this thread since this issue is very similar to one my team is experiencing. We have a board featuring a TPS65987DDH that is connected to a tablet via USB-C and the board itself is powered by a battery. When the tablet is connected and the battery is disconnected, the board is powered by the tablet over VBUS at 5V. When the tablet and the battery are connected, the tablet is charged by the board (battery providing power to PP_HV2 through a regulator).

    Our issue was that, when connecting the battery to the board with the tablet already connected, we would need to unplug and replug the tablet USB-C connection in order to get it to charge. The failure mode is that the tablet would continue to provide 5V to VBUS and the TPS65987DDH would remain in sink mode despite the battery and tablet being connected. However, I grabbed "david_comp-mode-all.pjt" off of this thread and modified it slightly to fit our use case and it now works. Disconnecting and reconnecting the battery now properly swaps power modes and charges the tablet when connected.

    Is this because of the custom non-user configurable changes that you made to the firmware mentioned earlier in this thread? If so, is there a way you could make the firmware build replicable for us users? I have a working copy of firmware that this forum provided but no way to actually build it if that would need to occur (for example, catastrophic failure of data management systems or eventual loss of tribal knowledge of how we obtained the working firmware).

    Thanks for any help you can give.

    - Jacob Cayetano

  • Hi Jacob,

    I'm happy to answer your question. Would you mind creating a new E2E thread? I will assign it to myself and reply there, promptly.

    Kind regards,

    Conner Gillette

  • Hello Conner,

    I actually already opened a thread on the related issue a few days ago here if that works.

    Thanks,

    Jacob Cayetano

  • I'll mark this as closed and reply on the other thread.

    Kind regards,

    Conner