Skip to main content
ARadh.1
Associate
January 29, 2021
Question

Setting up STUSB4500 sink for 12V,5 A

  • January 29, 2021
  • 3 replies
  • 4655 views

We are using the STUSB4500 PD chip in one of our applications. The requirement is to set the Power delivery to 12 V and 5A for the sink. I have been referring the driver code provided by ST to program our microcontroller. To set PDO to 12 V and 5 A, i program the DPM_SNK_PDO3 registers using I2C. The voltage and current are set as shown below

sinkPDOobj.fix.Voltage = (12000 /50);

sinkPDOobj.fix.Operationnal_Current = (5000 / 10);

temp[0]=(sinkPDOobj.d32 & 0x000000ff);

temp[1]=((sinkPDOobj.d32 & 0x0000ff00) >> 8);

temp[2]=((sinkPDOobj.d32 & 0x00ff0000) >> 16);

temp[3]=((sinkPDOobj.d32 & 0xff000000) >> 24);

adresse = DPM_SNK_PDO1 + 4*(3 - 1) ;

for(i=0;i<4;i++)

{

adresse+=i;

i2c_write_ctrl_reg(twi, adresse,temp[i]);

delay(100);

}

However when i read the DPM_SNK_PDO3 register , the voltage and current values are different from what i had programmed. Kindly guide me on how i should be programming to set the PD sink register for 12V and 5A configuration. I am connecting the type C cable from the laptop to the sink.

This topic has been closed for replies.

3 replies

Winfred LU
ST Employee
January 29, 2021

Please use PDO2 instead when the number of total valid PDOs is 2. (PDO2 has higher priority than PDO3)

After overwriting PDO contents in RAM, please try to send a soft reset to make it work.

ARadh.1
ARadh.1Author
Associate
January 29, 2021

Hi Winfred,

Appreciate the quick response. I tried setting PDO2 to 12 V and 5A followed by a soft reset, however when i read the register is see 15.2 V and 5A. I am using my laptop as a source to power the sink in my case. Anything else that i should be taking care of? We have an important release for which we need to finalize on the configuration of the USB-PD chip. It would great if you can help me resolve this.

Winfred LU
ST Employee
January 29, 2021

This is strange because there shall be no match in case either

if 15.2V is configured at PDO2 and Source provides 15.0V (w/o 15.2V) or

if 15.0V is configured at PDO2 and Source provides 15.2V (w/o 15.0V).

Maybe it was that the laptop is providing both 15.0V and 15.2V, and you accidentally misconfigured STUSB4500 PDO2 to 15.2V.

It will be clear to check the (CC) negotiating packets.

Please try to print RDOs and Source PDOs to have more information.

ARadh.1
ARadh.1Author
Associate
January 29, 2021

Hi Winfred,

Appreciate the quick response. I tried setting PDO2 to 12 V and 5A followed by a soft reset, however when i read the register is see 15.2 V and 5A. I am using my laptop as a source to power the sink in my case. Anything else that i should be taking care of?

Winfred LU
ST Employee
January 29, 2021

An alternate way to replicate the issue

is to configure NVM modifying default PDO settings, let the STUSB4500 start up as a standalone controller, and check how the negotiated result is.

ARadh.1
ARadh.1Author
Associate
February 1, 2021

Hi Winfred,

Is there any user guide that i can follow to configure the NVM PDO registers from my microcontroller application? I was not able to follow the example application that well.

ARadh.1
ARadh.1Author
Associate
February 19, 2021

Hi Winfred,

We have a STUSB4500QTR part but the device ID read is 0x25, does this mean that the chip does not support USBPD?

Winfred LU
ST Employee
February 19, 2021

Device ID can also be 0x25 for STUSB4500.

The device supports USBPD, with the evidence that you have seen a negotiated PDO 15.2V.

But it is just strange that how they got there. If it is possible to provide BMC traces (for CC pin) the cause will be clear.