Skip to main content
Mtopa.1
Associate III
June 22, 2021
Solved

I am using the USB-PD protocol with the stm32G071RBT6 processor with the tcpp01 card. I can only get 5v at the output(Vbus). I can't get 20v(Vbus). what should I do. APPLICATION NOTE(AN5418) , TCPP01-M12 DOCUMENT AND LINK OF USB-PD CODE BELOW.

  • June 22, 2021
  • 4 replies
  • 12547 views

BOARDS: STM32G071RBT6,x-nucleo-usbpdm1

APPLICATION VIDEO:https://www.youtube.com/watch?v=-vsJhNIaHxE

https://github.com/mbekirtopal/USB-PD/tree/main/usb_delivery

This topic has been closed for replies.
Best answer by Yohann M.

Dear @Mtopa.1​ 

You could refer to AN5418 and mainly the §5.1.4.

Idea is to change the Sink PD0 to accept 20V. For instance, if you want to have a Sink PDO 20V/3A, you should put the value '0x0006412C'.

In our GO demonstration, we provided user macro to help writing PDO:

STM32G081B-EVAL/Demonstrations/DemoUCPD/Inc/usbpd_pdo_defs.h

Yohann

4 replies

Nicolas P.
ST Employee
June 28, 2021

Hello @Mtopa.1​ 

The AN5418 target is to get your first contract.

If you want to act as sink, and cannot get other PDO than 5V, please check this wiki

You can also find full sink application with TCPP01 here.

Mtopa.1
Mtopa.1Author
Associate III
June 30, 2021

Thank you Nicolas,

I don't know how to change output value in sink application. Output is fixed with 5v as default how can I change it.

Yohann M.
Yohann M.Best answer
ST Employee
June 30, 2021

Dear @Mtopa.1​ 

You could refer to AN5418 and mainly the §5.1.4.

Idea is to change the Sink PD0 to accept 20V. For instance, if you want to have a Sink PDO 20V/3A, you should put the value '0x0006412C'.

In our GO demonstration, we provided user macro to help writing PDO:

STM32G081B-EVAL/Demonstrations/DemoUCPD/Inc/usbpd_pdo_defs.h

Yohann

Mtopa.1
Mtopa.1Author
Associate III
June 30, 2021

Thank you Yohann,

When I set sink pdo from cubemx, the section with sink pdo in cubeide comes as a comment line. How can I remove it?

Yohann M.
ST Employee
June 30, 2021

What do you mean by comment?

'U' at the end of the PDO is a C keyword to indicate the value is an unsigned int.

Note: you agree that 0x204B0FA is not a valid Sink PDO!

Nicolas P.
ST Employee
June 30, 2021

In addition to what @Yohann M.​ wrote, you can have a look here, to see how the PDO selection strategy is done.

@Mtopa.1​ : have you activated the TRACER_EMB ? Check chapter 5.2.2 in AN5418. You will have help in the debug trace (with UCPD monitor) to see what is going on...