2023-03-24 06:25 PM
I have a STM32G071B-Disco and straight out of the box it has been able to work for me as a Spy/Sniffer. Also, with the blue switch closed, it works as a Sink that can attach to my Source I'm developing and I can see the traces.
My Source supports sending and receiving custom VDMs and I'd like to use the Disco to send the VDMs to test this out. However, I have not been able to find a setting I can click in Port Configuration that will get rid of this pink message shown in the screenshot when I attempt to Enter VDM mode. "Message Rejected for this Port Configuration".
I would appreciate any help to show examples of the Disco using VDM mode. Or if it's determined that I need to flash some different code on the Disco, please let me know as well.
Thanks,
Arthur
2023-03-27 06:40 AM
Hello @AThom.12
You need to follow some sequence before entering into VDM mode.
See the wiki and the stack user manual : UM2552
What is the source device connected ?
Here in the trace we see that the discovery identity is answer is NAK. (not acknowledged, incoming message in green)
Are you sure that the VDM mode is valid ? You should do a SVID discovery to check.
See the GUI_INTERFACE code here.
The PC application rejects the message because the status returned is USBPD_FAIL :
status = USBPD_DPM_RequestVDM_EnterMode(PortNum, (USBPD_SOPType_TypeDef)sop, svid, mode);
And the reason of this fail is that you have to be DFP when you want to enter a VDM mode.
Have you tried to do a data role swap before trying to enter a VDM mode ?
Regards,
Nicolas