2025-08-05 9:59 PM
I've built a board around the STM32G0B1, hoping to get it to negotiate as much USB PD power as I can get. I've followed this tutorial: https://www.youtube.com/watch?app=desktop&v=-vsJhNIaHxE but see that some of the callback functions are deprecated:
But this header doesn't say what the new function is or where to find out what the new interface is.
This document is a lot of pages that don't tell me anything useful about how to actually use the library: https://www.st.com/resource/en/user_manual/um2552-managing-usb-power-delivery-systems-with-stm32-microcontrollers-stmicroelectronics.pdf
This one doesn't specify what are the functions to implement for the modern callbacks: https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Getting_started_with_USB-Power_Delivery_Sink
Could someone point me to an up-to-date reference on what the requirements are to use this plugin?
2025-08-06 3:20 AM
Hi @zbrozek
BSP_PWR_VBUSGetVoltage function is not obsolete but has undergone updates in recent STM32 firmware packages. It is still used for VBUS measurement and can be customized to fit specific hardware and VBUS sensing methods. However, its naming and implementation have been updated in newer firmware versions, such as X-CUBE-TCPP, where it has been replaced by BSP_USBPD_PWR_VBUSGetVoltage. Use wikis and examples in X-CUBE-TCPP for up to date guidance.
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.
2025-08-06 6:18 AM
Is there documentation that explains when to use the TCPP middleware versus the USBPD middleware? I'm not using a TCPPxx chip at all, so it was not an obvious package to examine.
Further, is there a document that clearly describes the requirements for implementing the TCPP middleware? The wiki article I linked targets that middleware, but only covers clicking through the GUI and says nothing of the requirements (e.g., does not explicitly show function prototypes for callbacks that must be implemented).
It would also be lovely if in a future release of the firmware package that the weak function definitions be removed so that compilation would fail if required callback functions are not implemented.
2025-08-06 7:22 AM
Hi @zbrozek
First, let me thank you for your feedback.
Second, I think UM2902 section 2.3 BSP for USB Power Delivery, can be helpful. You can always follow x cube tcpp current callback function names and prototypes, even if you are not using a TCPP chip. This will give you practical insights.
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.
2025-08-06 9:37 AM
Thanks; that video is helpful. And I have made additional progress using the TCPP middleware, though it does demand control of a couple of unconnected GPIOs to control a phantom TCPP01 chip. I'm still not getting the behavior that I want, but I have more threads to pull and will come back for more advice when I exhaust obvious avenues of exploration.
It would be great if the TCPP middleware were specifically for the TCPPxx series of chips, and the USBPD middleware were better encapsulated and more clearly documented.
2025-08-06 10:02 AM
Also, what does it take to use the STM32CubeMonitor-UCPD? I have wired out LPUART1 to the debug header on my ST-Link/V3PWR but the software does not seem to recognize the ST-Link at all. Is there some trick to get that to work?
2025-08-15 5:01 AM
Hi @zbrozek
If your initial question is already answered, accept as solution and open new thread for further questions to ensure clarity and adhere to community guidelines.
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.