cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for closest software example for implementing Dual Role Power UFP port. According to specification, such port should identify as power sink during initialization, and (in our application) after initialization perform a power role swap command.

VZ.1
Associate II

Question 1: are there any benefits to using standalone PD controller like STSUB1600 over integrated solution STM32G0x1

Question 2: are there code examples that are reasonably close to the DRP functionality ? In all the X-CUBE-USB-PD examples I've seen it's very hard to follow the logic through all the boilerplate code, and not clear when is required to simply initialize the port.

6 REPLIES 6
NBALL
ST Employee

Hello

DRP can connect as source or sink, depending on its counterpart.

It seems that your application needs is what is called 'sourcing device': power role is source while data role is UFP.

Depending on connection power role, application needs to do power or data role swap.

In our stusb1602 software package, we are proposing such project.

Hope it will fit your needs :)

Best regards

Nathalie

Nicolas P.
ST Employee

Hello,

you can also have a look at this wiki page.

Such power role swap application is available on STM32G0 and STM32G4 Evaluation boards.

The simplest software example will be available soon (end Q2) on a TCPP03 shield (for DRP), the equivalent of the already available TCPP01 shield (for Sink).

Thanks for the information. So I'll try to summarize what I learned - would appreciate corrections for any mistakes :

  • The "sourcing device" functionality sample code is available for STM32F072 CPU and STUSB1602 PD controller (can't be used as direct reference design though due to availability issues with F072 ...)
  • STM32G0 CPU can be used without PD controller. However, TCPP01 (X-NUCLEO-USBPDM1) shield does not allow prototyping SOURCE devices due to the configuration of VBUS gating. And both example code and DRP prototyping shield will be available in ~4 months.
  •  

So since waiting 4 months is not really an option for us, the practical approach would seem to be using the USB reference design and code from the Nucleo-usb002 , and then trying to port the example to a processor with better availability (probably from G0x1 line) Does that make sense? Would example code be easily portable to different CPU?

NBALL
ST Employee

Hello

STUSB1602 has currently FW package with stm32F072 - stm32F446 and stm32G474: available on web

We will have soon STM32L4R5 and stm32H723 (not available yet on web but available on demand)

If you have an other preferred stm32 we can have help you for the porting.

Best regards

Nathalie

VZ.1
Associate II

Another quick question regarding USB002 (MB1303) board: which firmware and compilation switches are loaded there out of the box?

Is that _DRP_2PORTS project?

This is the output I am getting :

>p 0
DRP role Unplugged                                                             
Local Source PDOs:                                                             
1) 5.00V 1.50A                                                                 
2) 9.00V 2.00A                                                                 
3) 12.00V 2.00A                                                                
4) 20.00V 2.00A                                                                
Local Sink PDOs:                                                               
1) 5.00V 3.00A                                                                 
> 

and yet GPIO_FOR_SRC seems to be disabled by default - so why am I seeing PDOS for 9/12/20v ?

Mohamed S.
ST Employee

Hello,

Regarding TCPP03-M20, the datasheet is now available on ST.COM.

 https://www.st.com/resource/en/datasheet/tcpp03-m20.pdf

This device is tailored for high voltage controls and protections of Dual Role Power, Dual Role Data applications when used with a STM32 controller with built-in USB-C controller such as STM32G0, STM32G4, STM32L5 or STM32U5.

Among other features, TCPP03-M20 integrates the charge pumps for the two integrated Gate Drivers (provider and consumer path), as well as discharge path for VBUS and VCONN. One key benefit is the power consumption during toggling that can be lowered thanks to the low power mode.

Its associated NUCLEO expansion board is the X-NUCLEO-DRP1M1 with example code for Dual Role Power available by Sept'21 in the X-CUBE-TCPP library.

Best regards,

Mohamed