Detect usb-c connection
Posted: Mon Dec 11, 2023 11:48 pm
On a custom pcb for a esp32 c6 I got something like this for my usb-c connection:
Can I use the CC1/CC2 pins on the usb-c connector to detect when a usb-c cable is connected? Ideally I would like to wake up from sleep / get a interrupt when a cable is connected. I measured the CC1 and CC2 on a usb-c breakout board and I got just below 1v when the cable was connected. Any ideas or examples on how to do this?
Code: Select all
VBUS -> 5V
D- -> esp32 pin 17
D+ -> esp32 pin18
SBUS1 -> NC
SBUS2 -> NC
CC1 -> R 5.1k -> GND
CC2 -> R 5.1k -> GND
GND -> GND