2021-06-22 09:19 AM
BOARDS: STM32G071RBT6,x-nucleo-usbpdm1
APPLICATION VIDEO:https://www.youtube.com/watch?v=-vsJhNIaHxE
https://github.com/mbekirtopal/USB-PD/tree/main/usb_delivery
Solved! Go to Solution.
2021-06-30 02:08 AM
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
2021-06-28 02:57 AM
2021-06-30 12:44 AM
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.
2021-06-30 02:08 AM
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
2021-06-30 02:55 AM
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...
2021-06-30 03:12 AM
2021-06-30 04:29 AM
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!
2021-06-30 04:51 AM
2021-06-30 05:04 AM
'__USBPD_PWR_IF_C' is not comment but it allows to define a variable in h file which is declared only by the file 'usbpd_pwr_if.c'. Other files use the variables as extern ones.
2021-07-01 05:43 AM