cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up STUSB4500 sink for 12V,5 A

ARadh.1
Associate III

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.

18 REPLIES 18
Winfred LU
ST Employee

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
Associate III

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?

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.

0693W000007DAWvQAO.pngAs per the table in the datasheet PDO3 has the highest priority?

Sorry that my wording was not precise.

I meant to say that when number of PDOs are set to 2, PDO2 (and PDO1) will be used instead of PDO3 (and PDO1).

As for priority when all PDOs are valid, it would be PDO3 > PDO2 > PDO1.

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.

Thanks Winfred.. I will try printing the RDOs and Source PDO. If i set the PDO to 12 V and 5 A and dont see it refelecting in the register does it mean that laptop source does not support 12 V profile?

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.

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.