cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G071KB USBPD SNK problem

Leo Tai
Associate II

Hi,

I am developing a USBPD system with STM32G071KBU6N. This MCU has a USBPD port. I am trying to use it to build a PD SNK port to get a PDO 20V/3A, 12V,3A,, 5V/3A.

However, the code was stuck in the Hardreset section. In the debug section,

  1. When the USB is plugged, it jump to Hardreset section.
  2. I can see the Hard reset status is USBPD_HR_STATUS_COMPLETED.
  3. Even the status is completed, the system still try to do the hardreset for a few times.
  4. After that, the notification message turn to USBPD_NOTIFY_POWER_SNK_STOP and then USBPD_NOTIFY_PE_DISABLED.
  5. Seems that the whole USBPD system is closed. Even I unplug and plug again the USB, the attach and detach event cannot be triggered.

I checked again the USBPD negotiation AMS, in the hard reset section, the USBPD_NOTIFY_PE_DISABLED shouldn't be shown.

is there any features I didn't handle in the usbpd_dmp_user.c/ usbpd_pwr.c causing this issue? As I didn't have the development tool, I cannot access to the USBPD GUI.

1 ACCEPTED SOLUTION

Accepted Solutions
Yohann M.
ST Employee

Dear @Leo Tai​ ,

Did you correctly implement the detection of VBUS detach? In Sink disconnection is done when it detects a VBUS disconnection (measured thanks to ADC in BSP_USBPD_PWR_VBUSGetVoltage function).

Please find a example of hard reset retransmission which leads to disabled state:

0693W0000000GMIQA2.png

PD file generated with USBPD GUI is very useful for us to analyze such issues. What do you mean by 'As I didn't have the development tool, I cannot access to the USBPD GUI.'?

Note: I take the opportunity to present you new wiki pages related to USB-PD topics on STM32: https://wiki.st.com/stm32mcu/wiki/USB_Power_Delivery_overview.

Yohann

View solution in original post

1 REPLY 1
Yohann M.
ST Employee

Dear @Leo Tai​ ,

Did you correctly implement the detection of VBUS detach? In Sink disconnection is done when it detects a VBUS disconnection (measured thanks to ADC in BSP_USBPD_PWR_VBUSGetVoltage function).

Please find a example of hard reset retransmission which leads to disabled state:

0693W0000000GMIQA2.png

PD file generated with USBPD GUI is very useful for us to analyze such issues. What do you mean by 'As I didn't have the development tool, I cannot access to the USBPD GUI.'?

Note: I take the opportunity to present you new wiki pages related to USB-PD topics on STM32: https://wiki.st.com/stm32mcu/wiki/USB_Power_Delivery_overview.

Yohann