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.

TPS65982: Why is 0x3F Power Status register showing "1.5A Current" instead "PD contract negotiated"?

Part Number: TPS65982

Hi guys.

A PowerDelivery charger has been connected to the type-C port of a developing board.

0x3F has fields' values:

[0]:PowerConnection: 1b (as expected)

[1]:SourceSink: 1b (as expected)

[3:2]Type-C Current: 01b (1.5A Current - wrong?)

Why was legacy parameter showed whether the Power Delivery device had been plugged?

P.S. I often read in 0x3F all zeroes after PDs were negotiated.

How to deal with this?

Thank you.

  • Was a power delivery contract negotiated? This field is related to the pull up resistor (Rp) detected on the CC lines to determine the current capabilities of the source device. 

  • I think the contract couldn't negotiated.

    Please advice needed steps for me.

    In my software I use 0x3F  to check:

    1. is the Power Connection -> Yes
    2. is the current 500, 1500, 3000 or PD negotiated one
    3. if PD so reading 0x34 Active Contract PDO to detect the contract values.

    But how to get known that 0x3F is ready to read?

  • Hi Yevhen,

    This is a good question. I am assuming you are reading register 0x3F using some type of embedded controller on your system using I2C. The best way for this embedded controller to know when to read the PD controller is based on the I2C_IRQ events. 

    Registers 0x14 through 0x19 are the interrupt registers that trigger the IRQ line low whenever that specific event occurs. This is the typical flow for enabling the IRQ functionality. I will use register 0x3F and determining the type of device being connected as my example. 

    1. Using the application configuration tool, enable the relevant bits that you want the PD controller to trigger on and notify the EC. For this specific example, your best event would the event 'PlugInsertOrRemoval' 
    2. Once you have updated the configuration using the application configuration tool, load the updated binary onto the external flash for the PD controller to load
    3. With the updated configuration loaded, the IRQ line will trigger low whenever a device has been inserted or removed
    4. When the IRQ line goes low, read register 0x14 to determine which IRQ event was triggered. If the 'PlugInsertOrRemoval'  event was triggered, you can have your EC read register 0x3F to determine what type of device is connected.
    5. use the interrupt clear (0x18) to clear the IRQ regsiter and bring the IRQ line back high. This was the EC will know when a new event comes in based on IRQ going low

    Hope this helps answer your question

  • Thank you for extended answer.

    IRQ line will be traced in the board next revision.

    But the main question remains does "PlugInsertOrRemoval" event completely cover a readiness of register?

    Because I detect 0x3F[1] sometimes as 0b00000000 or 0b00000111 or 0b00001111. The last value is acceptable for used PD charger.

    Could be the case when the IRQ event fires when 0x3F[1] has the second (unacceptable) value?

  • There is no event that covers each specific register. You have to use the IRQ events that are potentially related to a register to give you an indication of what register to read. 

    The "PlugInsertOrRemoval" is for both insert and removal. So the IRQ line will trigger when a device has been attached or removed. So if the register 0x3F reads 0 after this interrupt event has triggered, this is an indication that the device has been removed. 

    Also, I am not sure what you mean by unacceptable value. The register 0x3F indicates what type of device is being connected. If it a legacy type-C device or PD device. If it is acting as a source or sink. For the legacy type-c device, the Pd controller determines the value of the pullup resistor (Rp) applied on the CC pins to determine the current capabilities of that device. a 1.5A supply is an acceptable value if the connected device is advertising a 1.5A Rp