Detection of SDP, DCP, and CDP
The most common and straightforward usage of the charger detection block is to determine the type of USB port to which the device
has been connected. Each type of port has different load profile, maximum current, and communications capabilities, per the specifica-
tion. To use the charger detection block for this purpose:
1. Enable VBUS detection on the VBUS pin (must be connected to USB VBUS).
2. Optionally, enable the PD and/or SD interrupts with the corresponding enable bits.
3. Set DCDEN to "Full Detection" (0x3) to enable data contact detection and the associated timeout circuit.
4. Set PDEN to enable Primary Detection.
5. Set CHDEN to begin the charge detect sequence.
6. Wait for Primary Detection to complete (PDI = 1, or service the interrupt).
7. The SDP bit will indicate if a Standard Downstream Port is detected.
8. If the application requires further differentiation between DCP and CDP, set SDEN to enable Secondary Detection, and set CHDEN
to begin this sequence.
9. Wait for Secondary Detection to complete (SDI = 1, or service the interrupt).
10. The DCP and CDP bits will indicate if a Dedicated Charging Port or Charging Downstream Port has been detected.
EFM8UB3 Reference Manual
Universal Serial Bus (USB0)
silabs.com
| Building a more connected world.
Rev. 0.2 | 322