USB charger detection is performed through pins CC1 and CC2. These pins must be connected directly to the USB connector for detection to happen.
These pins have internal pull-downs with resistance equal to Rd.
When the device is plugged into a wall adaptor or USB power source, USB port detection runs automatically. One of the CC lines is connected to a pull-up at the source. The other CC line stays pulled down. The voltage over the corresponding Rd determines if a connection was made and if SYSREG can deliver 500 mA or higher current.
Comparators with thresholds at VRDCONN, VRD1A5, and VRD3A monitor CC line voltage when VBUS is present. All comparator output is debounced with tRDDEB and available to host software through register USBCDETECTSTATUS.
If enabled, an interrupt is issued to the host whenever a threshold is crossed (when voltage decreases or increases). The events are visible in register EVENTSVBUSIN1SET.
The USB power source capability is detected by one CC line at a time, depending on the orientation of the USB plug on the device. The other CC line remains at 0 V. The charger type is defined in the VBUSIN.CC1CMP or VBUSIN.CC2CMP field, depending on which pin is used for connection.
The default VBUS current limit of 100 mA is used until the power source capability is detected. Host software can update the VBUS current limit in VBUSINILIM0 after device detection. When a USB cable is unplugged and plugged back in, or a reset occurs, the default current limit is used.
- A reset
- The USB cable is unplugged and plugged back in
If USB Type-C configuration is not used, CC1 and CC2 can be left floating or connected to ground. The default VBUS current limit will remain at 100 mA until the host negotiates and configures a higher current.