How does USB Type-C determine the charging direction?
Mar 30, 2018| In simple terms, Type-C devices come in three forms: DFP, UFP, and DRP. DFP can only be a Source, UFP can only be a Sink, and DRP can do both.
Generally Wall charger is DFP, U disk is UFP, mobile phone, tablet and the like are DRP. When DRP and UFP are connected, DRP becomes DFP. When DRP and DFP are connected, DRP becomes UFP. The DRP device will constantly change its identity and switch back and forth between DFP and UFP. The Type-C spec specifies the time for switching, which is a range. When two DRPs are connected together, both will switch back and forth between themselves, so they who are acting as UFPs who are DRPs are random. After determining the UFP and DFP, if they support the PD protocol, they can switch Source and Sink through the PD protocol.
Finally, let's say that if one end of the cable is Type-C and one end is Type-A, according to the specification, the CC pin is pulled up through Rp, so that the end of Type-C can only be used as UFP. Similarly, if one end is Type-C and the other end is Type-B, or Micro/Mini, according to the specification, the CC pin should be pulled down through Rd. Thus, Type-C can only be used as DFP.


