cancel
Showing results for 
Search instead for 
Did you mean: 

[NUCLEO-F072RB EVK <==> STUSB4500] How to select PDO position using I2C register?

Bhautik
Associate II

I have used NUCLEO-F072RB EVK <==> STUSB4500 and tried to execute below git code.

https://github.com/usb-c/STUSB4500/tree/master/Firmware

I received below logs when source device attached:

########################################################################

=================== USB PD Sink Firmware v1.00 ===================

STUSB4500 detected. (0x21)

=== CABLE: Attached [CC2]

             ---- RDO (negociated power) ----

             Requested PDO Position: 1

             Operating Current: 3.00 A , Max Current: 3.00 A

             USB Com capable: 0 , Capability Mismatch: 0

             Voltage requested: 5.00 V

             ---- Usb_Port #0: Read PDO from Source   ----

             0 x PDO:

             P(max)=0W

---- Usb_Port #0 : Read local Sink PDO ------

3 x PDO:

 - Fixed PDO1=(5.00V, 3.00A, = 15W)

 - Fixed PDO2=(15.00V, 1.50A, = 22W)

 - Fixed PDO3=(20.00V, 1.50A, = 30W)

irq_40

=== CABLE: Attached [CC2]

irq_02 irq_02 DataMsg01(SourceCap) CtrlMsg03(Accept)

             ---- Usb_Port #0: Read PDO from Source   ----

             2 x PDO:

             - PDO_FROM_SRC(1)=(5.00V, 3.00A, = 15W)

             - PDO_FROM_SRC(2)=(9.00V, 2.00A, = 18W)

             P(max)=18W

irq_02 irq_02 CtrlMsg06(PS_RDY)

             ---- RDO (negociated power) ----

             Requested PDO Position: 1

             Operating Current: 3.00 A , Max Current: 3.00 A

             USB Com capable: 0 , Capability Mismatch: 0

             Voltage requested: 0.00 V

irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) irq_02 DataMsg0F(VDM) DataMsg0F(VDM) irq_02

########################################################################

So when source device [adaptor ] attached than source device send source capability i.e. 5V@3A and 9V@2A. and It's select PDO position 1 [5V@3A].

If I want to select PDO position 2 [9V@2A] instead of position 1 [5V@3A] than which type of changes is required or which register I need to set for select PDO position?

So when I attached "standard DCP type C [1.5A/3A]" device attached [Not PD compliant adaptor i.e. Nokia adaptor or [Type A to Type C cable 5V,2A] which is USB C support but non-PD standard adaptor] then How can I get source capability? and How can I set capability on sink device side?

1 ACCEPTED SOLUTION

Accepted Solutions
Gregory Go.
Senior II

Hello,

  • By looking at your log, we can see that STUSB4500 is configured to accept only one of these power profiles: 5V or 15V or 20V.

Sink PDOs:

3 x PDO:

 - Fixed PDO1=(5.00V, 3.00A, = 15W)

 - Fixed PDO2=(15.00V, 1.50A, = 22W)

 - Fixed PDO3=(20.00V, 1.50A, = 30W)

On the USB-C Source side, it can provide 2 profiles: 5V or 9V.

Source PDOs:

             2 x PDO:

             - PDO_FROM_SRC(1)=(5.00V, 3.00A, = 15W)

             - PDO_FROM_SRC(2)=(9.00V, 2.00A, = 18W)

So in this case, the only matching profile between SOURCE and SINK is the 5V profile, i.e. PDO-1.

That’s why the STUSB4500 requests 5V.

  • If you want the STUSB4500 to request the 9V profile from the SOURCE, you need to change its Sink PDOs to include the 9V PDO.

For instance, you can configure it with these profiles: 5V, 9V, and 15V.

You can do that by executing the following code:

{

Update_Valid_PDO_Number( Usb_Port, 3 );

Update_PDO(Usb_Port, 1, 5000, 1500);

Update_PDO(Usb_Port, 2, 9000, 1000);

Update_PDO(Usb_Port, 3, 15000, 1000);

PdMessage_SoftReset_WithTimeout();

}

  • So when I attached "standard DCP type C [1.5A/3A]" device attached [Not PD compliant adaptor i.e. Nokia adaptor or [Type A to Type C cable 5V,2A] which is USB C support but non-PD standard adaptor] then How can I get source capability? and How can I set capability on sink device side?

When you connect a USB-C PD Source to a Sink, it always starts to provide 5V to power up the Sink controller first. And then the USB PD negotiation can start to get higher power.

But if the USB Source is not PD compliant, it can only profile 5V. So you won’t get its source capability.

The only information you can get from a USB-C only Source (i.e. non-PD), it is the maximum current at 5V, which is known by determining the pull-up resistor on the SOURCE side.

There are 3 possibilities:

            5V @500mA,

           5V @1.5A,

           or 5V @3A

The STUSB4500 can determine the maximum current the USB-C Source can provide at 5V, by reading a corresponding register.

Regards

View solution in original post

6 REPLIES 6
Bhautik
Associate II

Hello Team,

Can any one please give suggestion regarding raise question?

Bhautik
Associate II

Highly appreciated if you give me your suggestion or answer.

Amel NASRI
ST Employee

Hi @Bhautik​ ,

Unfortunately this is not my area of expertise but I added the topic USB-PD to your question in order to increase its chance to be reviewed by our USB-PD experts.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks Amel for your response.

Gregory Go.
Senior II

Hello,

  • By looking at your log, we can see that STUSB4500 is configured to accept only one of these power profiles: 5V or 15V or 20V.

Sink PDOs:

3 x PDO:

 - Fixed PDO1=(5.00V, 3.00A, = 15W)

 - Fixed PDO2=(15.00V, 1.50A, = 22W)

 - Fixed PDO3=(20.00V, 1.50A, = 30W)

On the USB-C Source side, it can provide 2 profiles: 5V or 9V.

Source PDOs:

             2 x PDO:

             - PDO_FROM_SRC(1)=(5.00V, 3.00A, = 15W)

             - PDO_FROM_SRC(2)=(9.00V, 2.00A, = 18W)

So in this case, the only matching profile between SOURCE and SINK is the 5V profile, i.e. PDO-1.

That’s why the STUSB4500 requests 5V.

  • If you want the STUSB4500 to request the 9V profile from the SOURCE, you need to change its Sink PDOs to include the 9V PDO.

For instance, you can configure it with these profiles: 5V, 9V, and 15V.

You can do that by executing the following code:

{

Update_Valid_PDO_Number( Usb_Port, 3 );

Update_PDO(Usb_Port, 1, 5000, 1500);

Update_PDO(Usb_Port, 2, 9000, 1000);

Update_PDO(Usb_Port, 3, 15000, 1000);

PdMessage_SoftReset_WithTimeout();

}

  • So when I attached "standard DCP type C [1.5A/3A]" device attached [Not PD compliant adaptor i.e. Nokia adaptor or [Type A to Type C cable 5V,2A] which is USB C support but non-PD standard adaptor] then How can I get source capability? and How can I set capability on sink device side?

When you connect a USB-C PD Source to a Sink, it always starts to provide 5V to power up the Sink controller first. And then the USB PD negotiation can start to get higher power.

But if the USB Source is not PD compliant, it can only profile 5V. So you won’t get its source capability.

The only information you can get from a USB-C only Source (i.e. non-PD), it is the maximum current at 5V, which is known by determining the pull-up resistor on the SOURCE side.

There are 3 possibilities:

            5V @500mA,

           5V @1.5A,

           or 5V @3A

The STUSB4500 can determine the maximum current the USB-C Source can provide at 5V, by reading a corresponding register.

Regards

Hi @Bhautik​ ,

If you are satisfied by the answer provided by @Gregory Go.​ , please Mark it as best answer (click on "Select as Best").

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.