
USB-C vs MagSafe: Which Is the Better Charging Option in 2025?
2025-06-12Mastering USB-C: How USB-C Establishes a Connection
USB-C Specifications: A Primer
The Universal Serial Bus (USB) has become an essential part of modern computing, providing a standard interface for a wide variety of devices. The latest iteration of USB technology, USB-C, offers several improvements over the previous generation USB-A ports, including faster data transfer speeds, more powerful power delivery, and a reversible connector. Now one connector rules them all, so what happens when you plug in a USB-C cable or device? One key change with USB-C is the introduction of a connection state machine. This state machine manages the flow of data and power between devices. This is critical because any USB-C port can potentially play any role in a connection. We’ll explore how the USB-C connection state machine works and how it differs from older USB-A ports.
Some Terminology and Basics:
Before we get into the nitty-gritty, let’s review some basic USB terminology.
USB devices are classified as power ports, sink ports, and dual-role ports. Power ports provide power to connected devices while acting as the host for all data transfers (downstream ports). Sink ports draw power from connected devices and act as a peripheral (upstream ports). Dual-role ports can act as either a power source or a sink port, depending on the device connected.
The USB-C connector is able to act in both power roles simultaneously, which is a significant departure from previous generations. USB-A ports are fixed as a power source, while USB-B ports are reserved for use as a power sink. Also, because USB-C ports are able to act in both power roles simultaneously, they can choose to remain disabled until a connection is established and the power role is determined. The ability to detect connection, act in both power roles simultaneously, and support multiple connector orientations necessitates a connection state machine.
Let’s review some USB-C basics. A USB-C receptacle has two configuration channels (CC lines) for connection negotiation. A USB-C plug has only one configuration channel for orientation and uses the other side (where the second configuration channel is) for power (Vconn).
When a device is not connected, the port remains unconnected. The configuration channels (CC1/CC2) are either pulled up (Rp), pulled down (Rd), or switched between pull-up and pull-down, depending on whether it is a source port, sink port, or dual-role port. The absence of a reverse pull-up/pull-down resistor indicates that no device is connected to the port. When a sink device is connected to a source device using a USB-C cable, the CC line in the cable is pulled low to indicate that a device is connected to the port. A unique feature of USB-C is the option to not provide power until the connected state. This is in contrast to USB-A ports, which always provide power. When a USB-C source port is connected, it monitors the active CC line to see if the pull-down resistor is missing, and if so, stops providing power to Vbus and transitions to the Unconnected state.
A closer look at the connected states

Now let’s take a closer look at how the state machine works. For a USB-C sink device, the state machine goes through several states as the device connects and disconnects from the source device. These states include:
1. Not Connected. SNK: The device is not connected to the source and is in the Unconnected state. The sink may not be powered and the Rd resistor is present on the CC line.
2. AttachWait.SNK: The device is connected to a power source and is waiting for the power source to provide Vbus (power). Both Rp and Rd resistors will be present on the CC line.
3. Attached.SNK: The device is connected to a power source and can consume power.
For a USB-C source device, the state machine goes through several states when connecting and disconnecting from a sink device. These states include:
1. Unattached.SRC: The device is not connected to the sink and is in the Unattached state. Vbus is not provided and the appropriate Rp resistor is present on the CC line.
2. AttachWait.SRC: The device is connected to the sink and Vbus (power) is being enabled.
3. Attached.SRC: The device is connected to the sink and is providing power.
Dual-Role ports can act as either a source port or a sink port, depending on the requirements of the connected device. The state machine for a dual-role port combines the states of the source port and the sink port. When unattached, the device switches between Unattached.SRC and Unattached.SNK approximately every 70 milliseconds.
The USB-C connection state machine also uses the CC line to establish the direction of the port. For example, the source device uses a pull-up resistor (Rp) on the CC1 line, the sink device uses a pull-down resistor (Rd) on the CC1 line, and the USB-C cable has its CC orientation aligned to CC1 on both ports. They are now connected, and both are oriented in CC1.
What about USB-C cables?
Another unique feature of USB-C is that the cables contain Electronic Marking (E-Mark) chips. These chips advertise the capabilities of the cable, such as maximum voltage/current and maximum data transfer speed, to connected devices. The E-Mark is not required, and without it, the device reverts to safe parameters: 3A maximum current, 20V maximum voltage, and data rates of USB 2.0 (480Mbps) and/or USB 3.0 (5/10Gbps). All full-featured USB-C cables that support 5A, 50V, and USB4 (40Gbps) carry the E-Mark. Cables with the E-Mark have a pull-down resistor (Ra) connected to Vconn, which is opposite the CC line used for inter-device connections, and this resistor signals the source device to power Vconn with 5V. Accessories such as E-Mark, active cables, and display adapters use Vconn.
Conclusione
The USB-C connection state machine is an important part of the USB-C specification. It manages the connection, direction, and power delivery between devices. There is a lot of additional information that can be expanded on about USB power delivery, USB alternate modes, and support for legacy protocols, debugging, or audio. Understanding how the state machine works and the subtle differences between source ports, sink ports, and dual-role ports is essential for designing and developing USB-C devices. With its reversible connector, faster data transfer speeds, and more powerful power delivery capabilities, USB-C has become the new standard for USB connections, and it is necessary to understand it for new product development.