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: How to change configuration after start-up via I2C only

Part Number: TPS65987D

Hello team,

My customer uses the TPS65987D and have difficulty in programming the device after start-up from Sink to Source mode. The programming is done over I2C via the GUI.

Toggling GPIO pins does work except for GPIO12 and the power switch.

 

Attached you find a register dump after start up in Sink mode (Configuration 3) and a register dump of their intented Source mode (configuration 1). Their next step is to go to DRP mode.

We dump the following registers: 

�	0x26 power path (8 bytes RO)
�	0x27 global system config (14 bytes)
�	0x28 port configuration (8 bytes)
�	0x29 port control (4 bytes)
�	0x2d boot flags (12 bytes RO)
�	0x32 transmit source (64 bytes)
�	0x33 transmit sink (57 bytes)

1. Startup configuration 3

Registers read-out after startup:
0x26 : 0x08 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x00
0x27 : 0x0e 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x10 0x10 0x00 0x00 0x30 0x76
0x28 : 0x08 0x08 0x00 0xb6 0x3f 0x00 0x00 0x00 0x00
0x29 : 0x04 0x02 0x10 0x01 0x40
0x2d : 0x0c 0x00 0x00 0x00 0x00 0xa2 0x06 0x00 0x00 0x30 0x00 0x00 0x00
0x32 : 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x33 : 0x39 0x02 0x5a 0x90 0x01 0x01 0x2c 0x41 0x06 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x2c 0x69 0x11 0x00 0x2c 0x69 0x11 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

2. Switch to DFP source mode

Using RAW data from TPS65981 UI tool:

0x27 = 0x78000000141400800000000a0001
0x28 = 0x1dfb658c9
0x29 = 0x4011c4c2
0x32 = 0x190000000000000000000000000000000000000000000000000000501912c0000000100000001
0x33 = 0x4001692c4001692c00000000000000000000000000000000000000009901905a3601905a02

Registers read-out after switching to source mode:

0x26 : 0x08 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x00
0x27 : 0x0e 0x01 0x00 0x0a 0x00 0x00 0x00 0x80 0x00 0x14 0x14 0x00 0x00 0x00 0x78
0x28 : 0x08 0xc9 0x58 0xb6 0xdf 0x01 0x00 0x00 0x00
0x29 : 0x04 0xc2 0xc4 0x11 0x40
0x2d : 0x0c 0x00 0x00 0x00 0x00 0xa2 0x06 0x00 0x00 0x30 0x00 0x00 0x00
0x32 : 0x40 0x01 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x2c 0x91 0x01 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x90 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x33 : 0x39 0x02 0x5a 0x90 0x01 0x36 0x5a 0x90 0x01 0x99 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x2c 0x69 0x01 0x40 0x2c 0x69 0x01 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

 

What guidance could you give here?

  • Hello Frank,

    How is the TPS65987D loading the initial configuration on power up? Is your customer implementing an external SPI Flash or are they using one of the default configurations shown in Table 7 of the datasheet?

    Also, when you say "programming is done over I2C via the GUI" would you be able to elaborate on this?

  • Hello Adam,

    Initial startup = configuration 3 by means of ADC1 strapping. This configuration is functional. Their unit can be powered via USB-C in this way.

     

    In case the unit is powered via another power input (not USB-C) then we want to reprogram TPS65987D via interface I2C-1:

    • In a first step we want to bring TPS65987D in a situation that enables us to communicate with a USB stick. So TPS should be power sourcing instead of sinking.
    • In a second step we want to bring TPS65987D in a situation that enables us to have an OTG data interface on that port > so DRP.

     

    The register dumps attached are:

    • Register dump after start up > so with TPS in configuration 3 based on ADC1 state
    • Register dump after reprogramming TPS to be able to communicate with a USB stick. In this configuration TPS does not source power although we think it should based on the register programming.

    Related to the programming it's done through via FPGA to I2C port 1 of TPS65987D.

  • Hi Frank,

    Thanks for the clarification, believe I see the problem now. The default configurations for the TPS65987D were intended so you did not need an external SPI flash for operation, but could instead use one of the pre-programmed settings. However, changing the register values and operation of the TPS65987D goes outside of the scope of theses default configurations, which could lead to issues that you are seeing.

    I recommend moving in the direction of placing an external SPI flash so that way you can program the TPS65987D to act as both a source/sink dynamically as well as a DRP. You will use the application customization tool to generate the binary image and load this onto the flash. http://www.ti.com/tool/TPS6598X-CONFIG

  • New questions related to this:

    1. wrt reconfiguration of TPS65987D

    • can the SPI flash which is connected to TPS65987D be programmed through the I2C-1 interface?

     

    1. wrt internal register set configuration 1
    • I changed the ADCIN1 strap value to 0.146. This means the TPS device should start up with configuration 1 which should bring the device in DFP mode. I would expect that the power switch is then set in such a way that the +5V on PP_HV2 is set on VBUS. However this doesn’t happen. Is this normal behavior for configuration 1?

     

  • Hello Frank,

    Yes, you can update the contents of the SPI flash using the I2C interface if desired. You can refer to the following app note to help you get started http://www.ti.com/lit/an/slvae21a/slvae21a.pdf

    As far as configuration 1, no it uses PPHV1 as the supply for the 5V source. If you would like to use PPHV2 as the 5V source, then you will need to use the external flash implementation which is what I suggest