How do I detect if VBUS_P is present?

Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiMc_4245981
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

I'm working on a device based on CYPD3120-40LQXI.  The device can be either powered by the USB C cable or by an external barrel connector.  I'm unable to detect when the barrel connector is connected and I am ready to power up down-stream supplies.  I have VBUS_P connected (pin 40) but I can't figure out how to determine what is available.  I could use the pd_adc_sample function, but I don't know what value to use for port_pin, or if it would be valid.  Is there another way?

0 Likes
1 Solution

Hi,

Pin 40 cannot connect to ADC.

There are no documentation that describe more register info than ccg3_regs.h

Can you see if you can use VSYS? VSYS_DET comparator can be used to detect changes on the VSYS supply.

Regards,

Rajath

View solution in original post

0 Likes
3 Replies
NiMc_4245981
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

I found the ncell_status register and the PDSS_NCELL_STATUS_VBUS_P_STATUS mask, which I think might contain the information I want, but it is always 0.  Is there some documentation for these registers that goes into more detail than ccg3_regs.h?

0 Likes

Hi,

Pin 40 cannot connect to ADC.

There are no documentation that describe more register info than ccg3_regs.h

Can you see if you can use VSYS? VSYS_DET comparator can be used to detect changes on the VSYS supply.

Regards,

Rajath

0 Likes
NiMc_4245981
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

I'm detecting if VBUS_P is present by detecting if VSYS is present while the VBUS_C FETs are disabled.  This would indicate that VBUS_P is supplying my VSYS supply.

I also had to add a resistor to discharge the capacitor on VBUS.  Without that, I could quickly switch from external power to USB power without the CCG noticing (since the VBUS_P FETs are enabled.)  The resistor solved some other problems as well.