cancel
Showing results for 
Search instead for 
Did you mean: 

Can I initiate a USB-C PPS PDO change from a source without an RDO from the sink?

BRose.1
Associate

Hello, I am designing a power bank temperature controller that works by varying the PPS power profile to control a heating element's temperature. I am using an STM32G071RB mcu to handle the PD communication. I know that a PPS RDO is sent from the sink to the source in battery charging applications, but it would be simpler in my application if the source (Power bank with G0 mcu) could vary it's PPS voltage without the sink requesting it. Is this possible to do or must I send an RDO from the sink?

The sink is a 100W (20V 5A) heating element with a thermocouple that is relaying its data over the usb 2.0 pins of its usb-c connector. The temperature controller code will be running on the power bank. If PPS can only work when the sink sends an RDO then the power bank will need to send a message to a G0 mcu in the sink with the RDO's that it will then send back to the power bank. This seems redundant as this is not a sink directed charging application. I would instead like to skip this step and have the power bank change the PPS PDO when directed to by its own temperature controller code. Safety is not an issue here as the resistive heater has the max power of the USB-C spec so it can't be exceeded by a PDO.

To recap, is it possible to use PPS to vary output voltage without an RDO from the sink? If it is possible, how should I go about doing this?

Best,

Ben

1 ACCEPTED SOLUTION

Accepted Solutions
Yohann M.
ST Employee

Hello Ben,

Let's take as example the Demontration provided for EVAL-G081.

This demonstration has 2 USB-C PD ports on EVAL board (1 DRP on Port0 and 1 Sink only on Port1).

By default, PDO list for the source are set in the usbpd_pdo_defs.h.

In this demonstration, we have by default 3 FIXED PDO (5/9/15V) and 1 APDO (3.3V -> 5.9V) for port0.

You can change dynamically this list depending to your use case:

1) by default, when stack starts, it sends a SRC_CAPA to Sink with the list of PDO available in PWR_Port_PDO_Storage[USBPD_PORT_0].SourcePDO.ListOfPDO (copy of PORT0_PDO_ListSRC at init)

  • you can put only 3 FIXED PDO and then Sink should select one of this PDO

2) When contract is established, you can change this list of PDO in adding the APDO and send a new SRC_CAPA message thanks to the DPM function: 'USBPD_DPM_RequestSourceCapability'.

  • if sink supports PPS, it can select the APDO.

Please find how the procedure to send dynamically a SRC_CAPA message:

0693W000004GrIzQAK.png

For your information, you could find information in the wiki page.

Regards,

Yohann

View solution in original post

3 REPLIES 3
Yohann M.
ST Employee

Hello Ben,

It is always Sink to decide which PDO it wants to use. Solution could be to send dynamically SRC capability without APDO and with APDO to force sink to request changing to PPS.

Regards,

Yohann

BRose.1
Associate

Hello Yohann,

Thank you for the speedy reply. How exactly does sending the SRC capability force the sink to request an APDO from the source? Am I first negotiating a fixed PDO and then an APDO after power has been established? I found example PPS code in the X-CUBE-USBPDM1 G0 Projects examples I can use but I'm still not sure how the sink will send an APDO to the source without knowing what voltage and current to request. I know that I should be working in Projects\NUCLEO-G071RB\Applications\USB_PD\TCPP01_Consumer_PPS but I'm not sure what to do to get the sink to request the right APDO. Could you lay out a few steps that I can implement in the code and the files I should modify? I can use the information in the UM2552 user manual and the "How to build a simple USB-PD sink application with STM32CubeMX" Application note to write the code but I'm confused on how to get started with making the sink request the right APDO's as directed by the source. Also, Is there any other documentation I should read through for this and for writing the code?

Best,

Ben

Yohann M.
ST Employee

Hello Ben,

Let's take as example the Demontration provided for EVAL-G081.

This demonstration has 2 USB-C PD ports on EVAL board (1 DRP on Port0 and 1 Sink only on Port1).

By default, PDO list for the source are set in the usbpd_pdo_defs.h.

In this demonstration, we have by default 3 FIXED PDO (5/9/15V) and 1 APDO (3.3V -> 5.9V) for port0.

You can change dynamically this list depending to your use case:

1) by default, when stack starts, it sends a SRC_CAPA to Sink with the list of PDO available in PWR_Port_PDO_Storage[USBPD_PORT_0].SourcePDO.ListOfPDO (copy of PORT0_PDO_ListSRC at init)

  • you can put only 3 FIXED PDO and then Sink should select one of this PDO

2) When contract is established, you can change this list of PDO in adding the APDO and send a new SRC_CAPA message thanks to the DPM function: 'USBPD_DPM_RequestSourceCapability'.

  • if sink supports PPS, it can select the APDO.

Please find how the procedure to send dynamically a SRC_CAPA message:

0693W000004GrIzQAK.png

For your information, you could find information in the wiki page.

Regards,

Yohann