cancel
Showing results for 
Search instead for 
Did you mean: 

UCPD G0 Disco board in SPY mode doesn't show up as a USB device (STM32G071B-DISCO)

Brenden_PLUS
Senior

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.

 

 

 

6 REPLIES 6
Brenden_PLUS
Senior

 

Connection

So the STMG0 doesn't actually connect to the USB device.  It has a uart connection that talks to the programing STM32F0 chip.  

Screenshot 2026-01-24 at 11.40.51 AM.png

Read switch

Here's the read switch.  It does some kind of protection.  Just not sure what it does.

Screenshot 2026-01-24 at 11.37.35 AM.png

 

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.  

FBL
ST Employee

Hi @Brenden_PLUS 

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 manualonly the trace is available.

FBL_0-1769768976275.png

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.




Best regards,
FBL
Brenden_PLUS
Senior

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

  1. Start like this
    1. Switch closed
    2. usb dev board plugged in
    3. usb micro plugged in
  2. Connect via the software
  3. Then open the switch
  4. Then plug in the USB C device into the dev board.


In my mind the steps should be

  1. Have everything connect
  2. Connect to the software

 

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.   

 

FBL
ST Employee

Hi @Brenden_PLUS 

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.




Best regards,
FBL

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.  

 

FBL
ST Employee

Hi @Brenden_PLUS 

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.




Best regards,
FBL