A detailed explanation of the role of Type C-CC pins

Many people must be curious about the function of the USB CC pin. USB is often in contact, and everyone must know about its internal VBUS D+ and D-, but few people know the existence of the CC pin and its function. So, today, Xiaobai will briefly introduce its functions.

First of all, we need to introduce a few key terms:
DFP (Downstream Facing Port) downstream port, which can be understood as Host, and DFP provides VBUS, which can provide data. In the protocol specification, DFP specifically refers to the downlink transmission of data, and generally refers to the equipment for downlink data and external power supply. A typical DFP device is a power adapter. Can only do Source.

UFP (Upstream Facing Port) can be understood as a Device. UFP takes power from VBUS and can provide data. Typical equipment is U disk, mobile hard disk. It can only be used on the sink side.

DRP (DualRolePort): Dual-role port, DRP can be used as DFP (Host) or UFP (Device), and can also be dynamically switched between DFP and UFP. Typical DRP devices are laptops, mobile phones.

1. Insertion detection

Before DFP and UFP are not connected, VBUS has no output. When the DFP is connected to the UFP, the CC pin is connected. The CC pin on the DFP will detect the pull down from the UFP. At this time, it means that the connection between DFP and UFP is successful. Subsequently, DFP will turn on the FET on VBUS, and output VBUS to UFP.
insert image description here

2. Identify positive and negative insertion

Take the mobile phone that everyone contacts the most as an example. Mobile phones belong to DRP, which can be used as both DFP and UFP. Due to the existence of CC logic on the mobile phone, when the Type C is not connected, the CC pin is continuously pulled up and pulled down in a cycle. At this time, if you use an oscilloscope to measure the signal of the CC Pin of the machine, it is actually a square wave.

When the mobile phone is charging
, for the mobile phone, when it is used as a UFP, the internal CC pin is directly pulled down to the ground through Rd.
The charger, as a DFP, has two internal CC pins that are pulled up to VBUS.
When the charger is connected to the mobile phone and the CC1 pin of the charger is pulled low due to the pull-down of the internal CC pin of the mobile phone, it means that the UFP is inserted upward. Conversely, if the charger detects that the CC2 pin is pulled down, the UFP is inserted downward.
insert image description hereDFP on the left, UFP on the right

insert image description here
The illustration shows that CC1 is pulled low to represent positive insertion

3. Understand the VBUS configuration method: current mode and USB PD

The following table shows the power delivery capability provided by each USB standard. The pure type C port can provide 5V/3A power supply capability. If it cooperates with the PD protocol, the power supply capability can be higher (the USB pd protocol communicates through the CC pin).
insert image description here
Type c has two current modes of 1.5A and 3A. It mainly depends on the output capability of DFP. The DFP informs the UFP of its power supply capability through the voltage on the CC pin. The pull-down resistance of UFP remains unchanged at 5.1K, while DFP can generate voltage through the pull-up resistance Rp on its CC or the current source Ip.
insert image description here
The Type-C spec defines how much current the DFP needs to supply on the CC pin or how much pull-up resistor Rp should be used in different modes.
insert image description here
For UFP, it mainly knows the output capability of DFP through the voltage on CC pin. For example, when 5V/3A, DFP will pass 330uA current on CC. The voltage 330uA 5.1K=1.683V can be obtained on the UFP .
Or calculate the voltage 5V of the CC pin on the UFP through the pull-up resistor 10K on the DFP 5.1K
/(5.1K+10K)=1.688V. It can also be judged that the DFP is Vrd/3.0A.
insert image description here

4. Detect the type of port connected to the device

At the beginning of the article, it was said that DFP is the HOST side and UFP is the DEVICE side. There is a pull-up resistor Rp on the CC pin on the DFP side, and a pull-down resistor Rd on the CC pin on the UFP side. When the DFP is not connected to the UFP, the VBUS on the DFP is disconnected. Only when the DFP is connected to the UFP, the DFP will turn on the FET to supply power to the UFP.

DFP can judge whether it is connected to a debug or Audio accessory device according to the load status of CC1 and CC2 (as shown in the figure below).
insert image description here

5. Configure VCONN

From the figure below, you can see that A5 and B5 of the socket exist respectively as CC1 and CC2. The corresponding plugs exist in A5 and B5 are CC and Vconn.
insert image description here
CC Pin has CC1 and CC2. When one of the Pins is used as a connection between DFP and UFP. Another Pin is used for Vconn. When another CC pin is connected to a pull-down resistor Ra in the Cable, it means that this is an active Cable that needs to be powered. When DFP detects Ra, it will output VCONN on CC pin to supply power to Cable (with emark chip inside). The impedance of Ra is defined as 800ohm 1200ohm. This CC pin will switch to VCONN to output 4.75 5.5V externally, and the maximum power is 1W.
insert image description here

6. Negotiate between the two ports to establish DFP and UFP identities

In addition to DFP and UFP, Type-C also has a DRP (dual-mode port, as mentioned earlier, the mobile phone is DRP), which can switch back and forth between DFP and UFP at a certain interval. When the DRP port is connected to a DFP device, the DRP is switched to a UFP device; similarly, it can also be switched to a DFP device. When two DRP devices are connected, the DFP and UFP identities are random.
insert image description here
This is the internal frame diagram of the CC Logic chip inside a mobile phone. You can see that there is a switch inside the CC Pin to switch between RP and RD.
insert image description here
When the DRP is not connected to any device, the switch switches back and forth, and the waveforms of CC1 and CC2 are shown in the figure above. When a device is connected, the switch will be fixed at one end depending on the device. At this time, DRP can only be in one mode, which is UFP or DFP.

7. Configure to use other peripheral modes

The Type-C specification defines alternative (Alt) mode and peripheral (Accessory) mode. Hosts, devices, and cables can send formatted Vendor-Defined Messages (VDMs) to exchange information and discover USB IDs. When the host enters Alt mode after exchanging information with the device through VDM, the pin definition in the Type-C interface will change to support PCIe or DisplayPort. The example below is a Type-C dock that uses a MUX to switch PCIe or USB 3.1 signals to the Type-C port.
insert image description here
When the CC1 and CC2 pins are pulled down with Ra at the same time, the host will recognize the device as an audio device and then switch from the USB signal to the audio signal.
insert image description here
It can also be seen from the figure that when connecting to an audio device, Dp is connected to the right channel of the earphone, and Dn is connected to the left channel of the earphone. The SBU is connected to the MIC.
insert image description here

Guess you like

Origin blog.csdn.net/weixin_43772512/article/details/123307773