2026-01-24 8:16 AM - last edited on 2026-01-30 2:39 AM by mƎALLEm
So i have the stm32G0 usb-c disco board.
https://www.st.com/en/evaluation-tools/stm32g071b-disco.html
I've flashed the latest USBPD_Analyzer software on the device and i have the latest UCPD monitor project.
The semi problem is that it's kind of frustrating that in SPY MODE by default the mico doesn't show as a USB device. I only see the usb micro usb connection when i'm in Snk Mode. Is there a reason why in spy mode the USB connection to the PC from the micro doesn't show up?
So what i have to do is. Start in Snk mode. Connect to the PC via the micro usb connector and connect to the UCPD monitoring program. Then i can switch to SPY MODE then i can attach my devices to it. Which can kind of be flakey some times.
2026-01-24 8:52 AM
Connection
So the STMG0 doesn't actually connect to the USB device. It has a uart connection that talks to the programing STM32F0 chip.
Read switch
Here's the read switch. It does some kind of protection. Just not sure what it does.
Code
You do a HAL_NVIC_SystemReset. Every time there a change in DOOR_SENSE_PIN.
But i don't really see where the uart comm's happen.
2026-01-30 2:32 AM
Indeed this workflow is required because SPY mode is a passive sniffer role and doesn’t present itself as a USB device to the host PC. It is designed to provide trace data for debugging purposes. It's mentioned in User manual, only the trace is available.
Also in wiki, if the GUI responder is not activated (_GUI_INTERFACE compilation switch) in the embedded firmware (It is the case for the STM32G071B-DISCO, when the blue door is open = spy mode), the debug information are available (UART through VCP of the STLink, and the compilation switch _TRACE activated) you may still see the trace in UCPD monitor by clicking on the Trace button in the bottom right corner.
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-02-02 6:41 AM
So what i don't understand still is why in the Spy mode why it doesn't show up as a USB device.
I have to do this sequence
In my mind the steps should be
This isn't a big deal its just that the software or my pc fails and i need to restart the software. So i have to unplug and reset everything way more then i think i should.
2026-02-03 6:20 AM
The firmware simply never brings up the USB device stack neither in spy mode nor in sink mode. Windows never sees a USB device, and in spy mode there is nothing for the UCPD Monitor to connect to over USB.
What you are expecting is not feasible with this context.
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-02-07 12:12 PM
So i made a video of what the problem is i'm having.
https://www.youtube.com/shorts/p3VMNoLNCv8
Put yes i know the STM32G071 does not have a usb connection. But it does have one to the programmer. The programmers USB talks to the USB_UCPD app. This talking only works initially when the device switch is closed.
So that's the question i'm trying to solve.
2026-02-10 5:46 AM
Thank you for your feedback!
I have submitted an internal ticket to dedicated team for further explanation when reconnecting device (226988).
In my understanding, negotiation sniffer should be disabled whenever reconnected to SPY mode.
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.