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: Externally powered in Port Control has no effect

Part Number: TPS65987D

Hi,

My final goal is to change the (source) PDO bank based on the Barrel Jack Detect Event.
In testing if this would work, I have set the 'Active PDO Bank Follows EP' bit. I then tried setting Externally Powered in Port Control, but to no effect. It doesn't matter if it is turned on or turned off, it always advertises the PDO bank set as 'Active PDO Bank'.
Furthermore, changing the PDOs in bank 0 to 'Advertise Only If Externally Powered' and setting 'Active PDO Bank' to bank 0, I again tried switching between EP and not EP in Port Control, but still no effect. It will only advertise PDO 1, which is always advertised.

I'm using GUI Build Version 6.1.1.

Great thanks for your help.

Matthijs

  • Hello Matthijis,

    The "Barrel Jack Detect" does not control the Active PDO bank. The documentation states:

    "An input GPIO event to indicate to the PD controller that a barrel jack power
    source has been connected to the system. Upon a rising edge of this event,
    the dead battery flag will be cleared, the ExternallyPowered bit in the 0x29
    Port Control register will be set to 1, and the PD controller will attempt to
    become the power Source if it is currently the power Sink through a
    PR_SWAP request. Upon a falling edge of this event, the ExternallyPowered
    bit will be set to 0, and the PD controller will attempt to become the power
    Sink if it is currently the power Source through a PR_SWAP request."

    So, this basically operates at a PDO selection and Power role level and not at the PDO bank selection level.

    I hope this clarifies.

    Regards,
    Kedar

  • Hi Kedar,

    Thanks for your reply! So how does one change the PDO bank based on whether the system is EP or not? In my testing, the EP setting has no effect whatsoever. It's not clear to me what this EP actually means or what affect is has/should have.

    Best regards,
    Matthijs

  • Hello Matthijs,

    Please take a look at the Host Interface documentation for the device. The internal register TX Source Capabilities Register (Address: 0x32) has a setting to select the Active PDO Bank.

    Setting Bit 0 of Byte #3 (ActivePDOBank) in register 0x32 selects the Active PDO Bank to be Bank 1.
    Clearing the above bit selects Bank 0.

    Setting Bit 1 of Byte #3 (ActivePDOBankFollowsExternallyPowered) follows the Externally Powered input.

    If this bit is set, a 0->1 transition on the EP setting in Port Control Register (Address: 0x29) clears the bit ActivePDOBank which selects Bank 0 and a 1->0 transition of the bit ActivePDOBankFollowsExternallyPowered sets the bit ActivePDOBank which selects Bank 1.

    I hope this helps.

    Regards,
    Kedar

  • Hi Kendar,

    Is 'transition' the keyword for the EP setting in the Port Control Register? Because just setting the EP setting in Port Control Register has no effect for me, that's what I tried to explain in my previous reply.
    Now back to the 'Barrel Jack Detect' event. This event sets the EP bit, which is a transition of the EP setting, and should thus change the active PDO bank, right?

    Best regards,
    Matthijs

  • Hello Matthijs,

    So, the EP setting is simply a bit value and this selects the Active PDO bank. The 'transition' I mentioned, was more indicative of the value that the EP bit is set in port control. Sorry if this confused you.

    I was able to test this out and noticed that indeed the Active PDO bank doesn't seem to change as expected when the EP bit is set or cleared in Port Control register. This is a bug and will be taken up in the next release.

    For now, there are two ways to set the active bank:

    1. Change the selection directly by modifying 0x32
    2. Disable the port and re-enable it to the earlier setting in register 0x28.

    I hope this helps.

    Regards,
    Kedar

  • Hi Kedar,

    Thank you very much for clearing that up! I will await the next release.

    Best regards,
    Matthijs

  • Hello Matthijs,

    Glad to help! :)

    Regards,
    Kedar