2026-05-07 12:17 AM - last edited on 2026-05-07 12:20 AM by Andrew Neil
Hello,
I am currently working on a simple USB Power Delivery test project using the STM32G071C8.
The system has two USB Type-C ports.
I need to detect PDO information and eMarker capabilities in order to determine the appropriate power delivery behavior. However, eMarker detection requires VDM-related functionality, and I could not find any relevant examples or documentation on the official website to continue development.
The usbpd_vdm_user files generated by STM32CubeMX are essentially empty, and I could not find any useful reference information in either STM32CubeG0 v1.6.3 or X-CUBE-TCPP.
Could you please provide any related example code, application notes, or documentation that demonstrates:
VDM handling
Discover Identity flow
eMarker cable detection
SOP'/cable communication
Any reference material would be greatly appreciated and would help me continue development.
Thank you.
Solved! Go to Solution.
2026-05-07 7:57 AM
Hello @mitch_Hsieh
There is a related discussion on this topic, and demo USB Sniffer/ SPY mode available on the STM32G071B-DISCO board.
When the Type-C port cover (the blue door) is open, the board enters this mode, enabling it to monitor USBPD communication between a USB PD charger and a PC. In SPY mode, the board does not actively participate in the communication but instead captures trace data for analysis. This is particularly useful for debugging
husbpd = USBPD_HW_GetUSPDInstance(0);
LL_UCPD_StructInit(&settings);
LL_UCPD_Init(husbpd, &settings);
LL_UCPD_SetRxOrderSet(husbpd, LL_UCPD_ORDERSET_SOP | LL_UCPD_ORDERSET_HARDRST);
LL_UCPD_Enable(husbpd);
LL_UCPD_SetccEnable(husbpd, LL_UCPD_CCENABLE_CC1CC2);I hope this could be helpful
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.
2026-05-07 7:57 AM
Hello @mitch_Hsieh
There is a related discussion on this topic, and demo USB Sniffer/ SPY mode available on the STM32G071B-DISCO board.
When the Type-C port cover (the blue door) is open, the board enters this mode, enabling it to monitor USBPD communication between a USB PD charger and a PC. In SPY mode, the board does not actively participate in the communication but instead captures trace data for analysis. This is particularly useful for debugging
husbpd = USBPD_HW_GetUSPDInstance(0);
LL_UCPD_StructInit(&settings);
LL_UCPD_Init(husbpd, &settings);
LL_UCPD_SetRxOrderSet(husbpd, LL_UCPD_ORDERSET_SOP | LL_UCPD_ORDERSET_HARDRST);
LL_UCPD_Enable(husbpd);
LL_UCPD_SetccEnable(husbpd, LL_UCPD_CCENABLE_CC1CC2);I hope this could be helpful
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.