2025-11-24 5:28 PM
Hello Expert,
Could you please provide guidance on the issue below?
We are using the following setup:
- MCU: STM32G0B1CCTx
- Software: X-CUBE-TCPP 4.2.0 with USBPD Application 4.2.0 Dual Role
- Board Part: TCPP0203 v1.2.3
We are developing a USB PD board.
When we plug in an Android smartphone (USB Type-C port), the phone does not detect the connection.
Attached is the log showing three plug-in/plug-out attempts.(we plug in and out 3 times)
From the log, it appears that after attachment, the connection detaches immediately, then the roles switch, followed by another detachment.
We have already tried increasing the CAD source/sink toggle time from 100 ms to 144 ms, but the issue persists.
Could you advise on possible causes or solutions? Thanks.
DEBUG 86569 0 -- BSP_USBPD_PWR_SetRole : SNK -- 96
DEBUG 86609 0 -- BSP_USBPD_PWR_SetRole : SRC -- 97
DEBUG 86653 0 -- BSP_USBPD_PWR_SetRole : SNK -- 98
DEBUG 86693 0 -- BSP_USBPD_PWR_SetRole : SRC -- 99
DEBUG 86705 0 -- BSP_USBPD_PWR_VBUSInit -- 100
DEBUG 86705 0 -- BSP_USBPD_PWR_SetPowerMode -- 101
DEBUG 86706 0 -- Normal -- 102
CAD 86706 0 USBPD_CAD_STATE_ATTACHED_WAIT 103
CAD 91053 0 USBPD_CAD_STATE_DETACH_SRC 104
DEBUG 91053 0 -- BSP_USBPD_PWR_VBUSDeInit -- 105
DEBUG 91053 0 -- GDP/GDC setting : default -- 106
DEBUG 91053 0 -- BSP_USBPD_PWR_SetPowerMode -- 107
DEBUG 91053 0 -- Low Power -- 108
CAD 91053 0 USBPD_CAD_STATE_SWITCH_TO_SNK 109
DEBUG 91055 0 -- BSP_USBPD_PWR_SetRole : SNK -- 110
CAD 91055 0 USBPD_CAD_STATE_DETACHED 111
DEBUG 91097 0 -- BSP_USBPD_PWR_SetRole : SRC -- 112
DEBUG 91141 0 -- BSP_USBPD_PWR_SetRole : SNK -- 113
DEBUG 91181 0 -- BSP_USBPD_PWR_SetRole : SRC -- 114
2025-11-25 12:05 AM
2025-11-25 8:57 PM
2025-11-26 2:34 AM
When we try to plugin/out quickly, we chould see "USBPD_CAD_STATE_ATTACHED" state but not always.
2025-11-27 3:03 AM
Hello @PaulMinh
Did you implement the user code provided in this example? Would you share minimum schematics with USB C connector? Compare with reference board design to narrow down the issue.
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.
2025-11-27 6:27 PM - edited 2025-11-27 8:01 PM
Hello FBL,
We followed https://www.youtube.com/watch?v=mJ4VX_2B6wE&t=839s , for our custom board (configured as in MX_Config.PNG, SCH.pdf).
2025-12-03 4:15 PM
Hello FBL,
What conditions, order to change from this state "USBPD_CAD_STATE_ATTACHED_WAIT" to "USBPD_CAD_STATE_ATTACHED"?
We concern there is an unstable internal resistor; debounce failed and then unable to ATTACHED.
May you suggest how to debug and fix this issue? Thanks.