Unable to send any message
Dear members,
I'm working on an adapter project using the USB PD library to connect a NUCLEO-DRP1M1 and a SINK1M1 to an STM32G0C1-EV. The connection is a wire.
I have already ported from the manual and the sample program, and implemented USBPD_DPM_TimerCounter() and osSystickHandler() to HAL_TIM_PeriodElapsedCallback().
When the Power Bank is connected to the evaluation board, it is confirmed that power negotiation is performed and voltage is supplied.
I then tried a test program that calls PowerRoleSwap() when the button is pressed, but depending on the target to be connected, the messages are not sent.
When I connected my Power Bank and pressed its button, the PR_SWAP message was sent as expected. (Of course, that request was denied by Power Bank.)
But, when I connected a smartphone and pressed the button, no PR_SWAP was sent.
What are the conditions for the USB PD stack to emit PR_SWAP?
For Smartphones
0 EVENT 5636596 1 EVENT_ATTACHED
1 DEBUG 5636596 1 VBUS:5085, CC:2
2 SRC 5636755 1 SRC_CAPABILITIES DATA:96900136 / 5V - 1.5A SOP PD3 H:0x13A1
3 SNK 5636756 1 GOODCRC SOP H:0x0201
4 SNK 5636757 1 REQUEST DATA: 2C590214 / ObjectPosition:1 / GiveBack:0 / CapabilityMismatch:1 / USBCommunicationCapable:0 / NoUSBSuspend:0 / UnchunkedExtendedMessagesSupported:0 SOP PD3 H:0x1082
5 SRC 5636758 1 GOODCRC SOP H:0x0161
6 SRC 5636759 1 ACCEPT SOP PD3 H:0x05A3
7 SNK 5636759 1 GOODCRC SOP H:0x0401
8 SRC 5636760 1 PS_RDY SOP PD3 H:0x07A6
9 SNK 5636761 1 GOODCRC SOP H:0x0601
10 SRC 5636862 1 SVDM_DISCOVER_IDENTITY DATA:01A000FF / VDM : INIT SOP PD3 H:0x19AF VENDOR_DEFINED
11 SNK 5636863 1 GOODCRC SOP H:0x0801
12 SNK 5636865 1 SVDM_DISCOVER_IDENTITY DATA:41A000FF4C05001000000000AAAA0200 / VDM : ACK / VID : 0x054C : Sony SOP PD3 H:0x428F VENDOR_DEFINED
13 SRC 5636865 1 GOODCRC SOP H:0x03A1
14 SRC 5636867 1 SVDM_DISCOVER_SVIDS DATA:02A000FF / VDM : INIT SOP PD3 H:0x1BAF VENDOR_DEFINED
15 SNK 5636867 1 GOODCRC SOP H:0x0A01
16 SNK 5636868 1 SVDM_DISCOVER_SVIDS DATA:82A000FF / VDM : NAK SOP PD3 H:0x148F VENDOR_DEFINED
17 SRC 5636869 1 GOODCRC SOP H:0x05A1
I pressed the button, but there's no response...
For Power bank (On line 13, a PR_SWAP message is sent.)
0 EVENT 5686458 1 EVENT_ATTACHED
1 DEBUG 5686458 1 VBUS:5128, CC:2
2 SRC 5686561 1 SRC_CAPABILITIES DATA:F090010B2CD102002CB10400E1400600 / 5V - 2.4A / 9V - 3A / 15V - 3A / 20V - 2.25A SOP PD3 H:0x41A1
3 SRC 5686563 1 SRC_CAPABILITIES DATA:F090010B2CD102002CB10400E1400600 / 5V - 2.4A / 9V - 3A / 15V - 3A / 20V - 2.25A SOP PD3 H:0x41A1
4 SRC 5686565 1 SRC_CAPABILITIES DATA:F090010B2CD102002CB10400E1400600 / 5V - 2.4A / 9V - 3A / 15V - 3A / 20V - 2.25A SOP PD3 H:0x41A1
5 SRC 5686746 1 SRC_CAPABILITIES DATA:F090010B2CD102002CB10400E1400600 / 5V - 2.4A / 9V - 3A / 15V - 3A / 20V - 2.25A SOP PD3 H:0x41A1
6 SNK 5686747 1 GOODCRC SOP H:0x0001
7 SNK 5686749 1 REQUEST DATA: 2CB10421 / ObjectPosition:2 / GiveBack:0 / CapabilityMismatch:0 / USBCommunicationCapable:0 / NoUSBSuspend:1 / UnchunkedExtendedMessagesSupported:0 SOP PD3 H:0x1082
8 SRC 5686749 1 GOODCRC SOP H:0x0161
9 SRC 5686751 1 ACCEPT SOP PD3 H:0x03A3
10 SNK 5686752 1 GOODCRC SOP H:0x0201
11 SRC 5686801 1 PS_RDY SOP PD3 H:0x05A6
12 SNK 5686802 1 GOODCRC SOP H:0x0401
13 SNK 5690486 1 PR_SWAP SOP PD3 H:0x028A
14 SRC 5690487 1 GOODCRC SOP H:0x0361
15 SRC 5690489 1 NOT_SUPPORTED SOP PD3 H:0x07B0
16 SNK 5690490 1 GOODCRC SOP H:0x0601
B.R.
