Skip to main content
Gbang
Associate II
Oct 12, 2019 8:27 AM UTC
Solved

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

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.

​

This topic has been closed for replies.
Nicolas P.
Nicolas P.Best answer
ST Employee
Oct 14, 2019 8:14 AM UTC

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

1 reply

Nicolas P.
Nicolas P.Best answer
ST Employee
Oct 14, 2019 8:14 AM UTC

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