cancel
Showing results for 
Search instead for 
Did you mean: 

How to check vbus is on or off in stm32g4 usb pd?

Gbang
Associate III

From the document, the sink will check:

A SINK must present an Rd resistor and detection is done in two steps:

1. detect the presence of Rp resistor

2. detect a VBUS ON.

I tested in stm32g431rb, connect ucpd_cc to a power adapter(source), Source send the source capabilities, but sink without response. btw, sink did't find the cable is pluged, because `USBPD_DPM_CADCallback` was not called.

I guessed the reason is vbus and how to connect vbus? thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Nicolas P.
ST Employee

on G4 nucleo with STM32GG431RB, there is no Type C receptacle. How can you measure VBUS level ?

If you look on the other G4 boards with Type C we use voltage dividers and ADC.

On STM32G474E-EVALfor example, ADC2_IN6 on PC0 pin is used for VBUS level detection (VSENSE)

0690X00000AqIzaQAF.png

View solution in original post

1 REPLY 1
Nicolas P.
ST Employee

on G4 nucleo with STM32GG431RB, there is no Type C receptacle. How can you measure VBUS level ?

If you look on the other G4 boards with Type C we use voltage dividers and ADC.

On STM32G474E-EVALfor example, ADC2_IN6 on PC0 pin is used for VBUS level detection (VSENSE)

0690X00000AqIzaQAF.png