Cover photo
Rafael Teixeira
Lives in São Paulo, SP, Brasil
683 followers|309,310 views


Rafael Teixeira

Shared publicly  - 
USB Type C’s Configuration Channel

I’ve been getting questions about why certain kinds of USB adapters or cables work to charge new Type-C devices, and why other adapters are necessary to charge legacy devices from Type-C chargers.

This post will explain why, and will do a deeper dive into Type-C’s Configuration Channel (CC).

USB Type-A and Type-B
But first, I will start out with a description of how USB worked before Type-C so that we all understand some of the basic concepts.

USB cables are directional, meaning that each end of a cable has physically different plug: Type-A plug (the rectangular port and plug we find on our PCs, hubs, and chargers), and a Type-B plug (the squareish plug, or the smaller mini-B and much more common micro-B variants).

USB systems always form a tree based structure with a single USB host at the root (typically your PC), and one or more devices as leaves. USB was designed this way for simplicity. Hubs always have exactly one Type-B port and one or more Type-A ports. Devices by definition only have one Type-B port. Type-A plugs always plug into something that is closer to the root, or in other words Type-A plugs point “upstream.” Type-B plugs always plug into something that is further away from the root, or in other words Type-B plugs point “downstream.”

This architecture prevents problematic loops that are possible with other systems that have the non-directional cables, for example, Ethernet. A user simply cannot set up an incorrect USB tree by virtue of the physically different plugs and connectors.

Enter Type-C and CC
Type-C does not just replace one of the two classic USB connectors. It replaces both A and B types, making completely symmetrical and reversible Type-C cables possible. This does beg the question though: Does this mean that since the connectors and the plugs are physically identical that the tree structure of USB is no longer enforced?

The answer is no. USB Type-C systems still maintain the same tree structure as before with one USB host and one or many USB devices. Instead of a physically different connector and plug to signify the direction of data and power, USB Type-C devices now indicate their roles electrically through a brand new mechanism: the Configuration Channel or CC.

Each USB Type-C port has 2 CC pins, oriented in such a way that when you flip the cable over the the CC pins in the cable plug always land on one of the two CC pins.

The new USB specification defines a new set of terminology to represent different ports, now that both types of ports are now share the same formfactor:
* “Type-A” ports become Downstream Facing Ports (DFP)
* “Type-B” ports become Upstream Facing Ports (UFP)

A resistor is placed on CC to mark whether a Type-C port is a DFP or a UFP:
* DFP uses an Rp, or a pull-up resistor between CC and Vbus
* UFP uses an Rd, or a pull-down resistor between CC and Vbus

When a DFP (usb host) is connected to a UFP (usb device) by means of a cable, the CC on both sides are connected together, and the shared CC line has both a pull-up and a pull-down on it. Both sides read the voltage on this line and can recognize that a connection has just been made when the voltage becomes a predictable value.

There’s more! The CC lines are also how Type-C implements connector “flip”ability or cable twist. Remember I noted that there are actually 2 CC lines in the Type-C cable that happened to line up such that each CC on the plug side will always line up with a CC in the connector. By monitoring the voltage on both CCs, a host or device can figure out which orientation the cable is in and route the other wires appropriately.

Legacy cables and adapters
CC works great when you have all Type-C cables and ports, but Type-A hosts and Type-B devices will still exist. Type-A and Type-B ports and plugs do not have the new CC line, but what happens when you try to connect a Type-A host or Type-B device to a Type-C host/device?

The cables and adapters themselves must provide the proper CC pullup or pulldown in lieu of the Type-A or Type-B port that is missing the CC pin. Here are the two classes of cables :

* Legacy Host Port Adapter - Standard-A plug or Micro-B receptacle on one end - Requires a 56kΩ pullup from CC to Vbus
* Legacy Device Port Adapter - Micro-B plug, or Standard-A receptacle, or Standard B plug on one end - Requires a 5.1kΩ pulldown from CC to Gnd.

Many people ask me if “OTG” adapters are allowed in USB Type-C, and the answer I always give is that “OTG”, an older USB standard that allowed for devices to swap roles, doesn’t apply to USB Type-C, and that the adapter they are probably looking for is the Legacy Device Port adapter above that goes to a Standard-A receptacle for a USB flash drive, for example.

An example of a Legacy Host Port adapter for sale is this A-to-C cable from Google:
An example of a Legacy Device Port adapter for sale is this A-port-to-C adapter from Google:
So, the Type-C legacy cables that you can buy on the market today have (or at least are supposed to have) the correct resistor such that their roles are always fixed.

*On Legacy Host Port Adapters, power and data always flow toward the Type-C plug.
*On Legacy Device Port Adapters, power and data always flow from the Type-C plug.

This also answers the question that some have asked why they can’t simply chain together a clever series of adapters and non-compliant cables and hope it will charge their phone.

This leads to the topic that I’ve been quite vocal about in my Amazon reviews, which is power. The original USB port provided 500mA at 5V, or 2.5W of power. Ever since USB micro-B became the near universal standard for cell phone and other handheld device charging (thanks, Europe!) there’s been an arms race to increase the power that a USB charger or port can provide over the same wire to a device.

In the past decade, the USB-IF and other 3rd parties (most notably Apple) have responded by creating protocols that allow for chargers to deliver higher currents over the same wire to supported devices. They do this by signaling over USB’s data lines (D+ and D-). Chargers that support USB’s Battery Charging 1.2 specification may support up to 1.5A, while Apple’s protocols allow for 1A, 2A, and 2.4A levels.

With the USB Type-C specification, the requirements are beefed up so that every cable must be able to support 3A, however, that doesn’t mean that 3A is possible in every situation : the charger or power source must still be able to provide it, which is where CC comes in.

Remember before that every DFP (Downstream Facing Port or Host port) must use an Rp to identify itself as a DFP. The USB Type-C specification actually uses different values of resistance of Rp in order to allow the DFP to advertise its supply capabilities:

* Default USB Power - 56kΩ pullup
* 1.5A - 22kΩ pullup
* 3.0A - 10kΩ pullup

The bottom two modes are only allowed on non-legacy USB Type-C ports and cables, and only if the power supply has satisfied the electrical requirements to meet a 1.5A or 3.0A load. Under no circumstances may Legacy cables use 1.5A or 3.0A advertisements.

Legacy cables must use “Default USB Power” which at a minimum, means that it restricts it to 500mA for USB 2.0 or 900mA for USB 3.1. However, “Default USB Power” still allows for the negotiation on USB’s data lines D+ and D- using all of the protocols that would have worked on USB A-to-Micro-B cables, meaning that a Default USB Power legacy cable should be able to provide from 500mA to 2.4A of charging.

The specification allows a Type-C DFP power source to actually modify the Rp value in response to changing conditions.

For example, a 3A charger may be built with two USB Type-C ports. When one device is plugged in, it should advertise to that device a 10kΩ pullup to tell it that it can draw 3A. When a second Type-C device arrives, the charger can change the Rp on the first port to 22kΩ to tell it that it can only draw 1.5A. The second port may also be given a 22kΩ Rp, balancing the loads evenly across both ports.

When one of the devices is detached, the charger could even recognize that it's back down to 1 consumer, and give that port back its 10kΩ pullup, allowing it to draw 3A again.

Conclusion and Much More
USB Type-C’s configuration channel provides a ton of functionality. To summarize :
* Determines role, Host Vs. Device
* Determines when devices are attached to host
* Determines orientation, allowing for Type-C’s “flipability”
* Negotiates up to 3A power between charger and device.

There’s actually MUCH more that CC does, specifically, the configuration channel is integral for USB Power Delivery, a protocol that allows for much more robust, flexible and complex communication between both sides, and for Alternate Mode too…

Just as a preview for next time, CC, PD, and Alt Mode allow for :
 *Negotiated higher voltage and current, up to 20V, 5A for 100W of power
 * Power role switching, so your hub powers your laptop, instead of the other way around
 * Data role switching
 * Alt mode, so you can use your USB cable to display video, or much much more.

See you next time!

#USB   #TypeC   #USBC
34 comments on original post
Add a comment...

Rafael Teixeira

Shared publicly  - 
Joined the light side!
Awaken the Force within you. Choose a side and your Google apps will follow your path.
Add a comment...

Rafael Teixeira

Shared publicly  - 
Mostly the same gripes I have...
I don't like the new Googe+ for the deskop. Simple is for simple people. I feel left out when you try to make it easier for the masses and make it worse for the enthusiastic few :(((  This might be ok to use on a tablet, but a major step backwards for the mouse users with reasonably good eyesight.

What prevents me from switching?
► Lots of unused space on my screen → lots more scrolling :(
► 2 columns instead of 3
animated gifs don't move unless I click on them
► only two items are shown of a gallery not 3 or 4
► font size / controls are way too large :( I am past kindergarten
► communities: more difficult to see join requests
► I need to click on people to follow them. I miss the hover popup
► The list view for community members is not as practical as the cards page was

What I like:
► I can still switch back to the classic view: please keep it until the points above are addressed. Thanks :)

BTW: Instead of ruining the browser UI, please add ability to attach images to post replies.

(I still need to go back to picasaweb from time to time because so many of its functions are still never implemented in Google+ or the "shiny new" Google Photos)
3 comments on original post
Add a comment...

Rafael Teixeira

Shared publicly  - 
Friends of Palestinian Ashraf Fayadh believe he is being punished for posting video showing religious police lashing a man in public
View original post
Add a comment...

Rafael Teixeira

Shared publicly  - 
Not only small business will rally against it as TTIP is bad for all except the largest corporations that are tailoring it for themselves...
Small Businesses Start To Campaign Against TTIP - important rebuttal to claims of widespread SME support for #TTIP
We all know that many civil society campaigners are concerned about the secrecy surrounding TTIP (the proposed Transatlantic Trade and Investment Partnership), and oppose the undemocratic ISDS (Investor State Dispute Settlement) mechanisms but according to the European Commission, ...
View original post
Add a comment...

Rafael Teixeira

Shared publicly  - 
My son and I have published our first game for Android!
For KitKat and up.

#games   #android   #WEBforAll  
Play through over 80 levels of fun and challenge, finding the right way to ...
Add a comment...

Rafael Teixeira

Shared publicly  - 
Add a comment...
Have him in circles
683 people
Ashish Sharma's profile photo
Pasi Ääpälä's profile photo
Francisco Figueiredo Jr.'s profile photo
Natalie Stewart's profile photo
Home Decoration and Furnishing's profile photo
TechDeem's profile photo
khokan mondal's profile photo
Lorin Olsen's profile photo
Robotics's profile photo


14 communities

Rafael Teixeira

Shared publicly  - 
Even cheaper #RaspberryPi  the #PIZERO  at US$ 5, but an starter kit at +Adafruit Industries will cost you US$ 29.95 and unless you have some keyboard/mouse/hdmi monitor/wifi dongle hanging around you'll also need to buy them, so it is still not mindless cheap to have your small computer...
New Raspberry Pi costs less than the HDMI cable you'll need to plug it into a TV.
Add a comment...

Rafael Teixeira

Shared publicly  - 
Topological Politics: Some Implementation Details

The problem of reaching a new, large-scale political order from an old one was, for longer than people expect, a generally, cross-culturally unsolved problem. Many of the earliest tolerable states were tolerable because they did not, and could not, make substantial changes to a deep underlying order. The king of Israel could not change the law. Germanic kings could not change the law. The Caliph could not change the law. The Pope could not change the law. This meant, in general, that systems, when they adapted, adapted by legitimizing new interpretations of old patterns, rather than by imposing new patterns themselves.

Systems for changing the political order are ancient, but -- for a very long time -- didn't scale. For bands, consensus was often enough; for tribes, direct democracy worked well. Beyond that scale threshold, mechanisms like markets, judges, ritual, and regional delegation expanded the scope of public consent, but -- in general -- all forms of large-scale organization have relied on the use of public force alongside consent.

Force is easy. It requires only the consent of men with guns, and the compliance of people on the wrong end of those guns. With enough of a force disparity, you can get precisely the outcome you want, precisely when you want it. In the lead-up to the use of force, it often seems like a useful tool to cross some unpleasant utility valley which couldn't be bridged by consent alone.

Unfortunately, even force requires consent. The more force you intend to apply, and the greater the risk to your gun-wielding elites, the deeper the consent you need from those elites. You could buy them off -- which requires paying them from spoils drawn from the people you're using force against -- or you could make them fanatically devoted to your ideals, which makes them dangerous when, inevitably, you have to change course. Over long timescales, levels of systemic force tend to degenerate into stationary banditry: because relaxation of force would result in the collapse of the system, politico-military elites tend to increase in importance as the amount of force required to sustain the system increases.

Which leaves mass consent.

Obtaining mass consent is more difficult. Mere democracy won't get you there: you need a family of non-interfering norms and laws which maintain consent even in the face of elites or majorities willing to expend that consent for short-term or personal goals. In particular, you need some mechanism to restrain public force, some mechanism to restrain private force, some mechanism to prevent elites from taking strongly consent-depleting actions, some mechanism for swapping elites without and some mechanism to implement decisions within the system more-or-less deterministically.

More or less, you need posse comitatus, legal procedure, meaningful enforcement of laws and norms against private parties, civil rights, an independent judiciary, democracy, and a bureaucracy. There may or may not better mechanisms than these -- but these are the ones most commonly used.

The structure of mass consent, especially mass consent in extremis, gives political elites a limited control surface: they can either respect the structures which allowed rotation of political elites to begin with, or they can attempt to supplement flagging consent with force or quasi-legitimate, unilateral action. This, again, is perfectly good (in a morally neutral sense) for chasing short-term goals, but both (a) renders the system of consent brittle, and (b) risks the development of counter-norms (and, in the American system, law) opposed to long-term objectives.

Which means, basically, that when people tell me, "WHY AREN'T YOU PULLING THIS POLICY LEVER SO HARD IT SNAPS OFF IN YOUR HAND?", it's not that I disagree that the problem is important. It's that I think the problem is either (a) not important enough to risk breaking a control surface to achieve it, or (b) requires sufficiently long-term action that attempting to act now would foreclose the possibility of acting in the future. 
"Were the people who believed in eugenics just fools? I think we have to try to stop them!" "You can't stop other people from pursuing their projects, their dreams. Even if they are crazy dreams, e...
15 comments on original post
Add a comment...

Rafael Teixeira

Shared publicly  - 
Switched back after suffering it for just a few minutes. Two columns or Twitter/Facebook single column is just not good enough on my wider screen.
Sadly it seems we will lose classic G+ soon, but they need to fix the new layout ASAP, or I'll give up social: I use Facebook once a month only because my family is there, and Twitter is just too forcibly concise that I also can't endure it for long periods (> 15 minutes) and at most once a week.
+Google+ /
New Google+ >
. Start here >
. Community >
. Google+ Safety Center >
. YouTube >
. Discover Google+ >
. Google+ Tips & Tricks' Collection >
. Google+ Brands >
. Branding Guidelines >
. Insights:
. Partner Playbook >
. Partner Playbook Audio-Visual Guide:
. Google+ For Work >
. Google+ Growth: 2.5 BILLION accounts >
. Policies for Google+, Hangouts & Photos >

. Get Help In Google Product Forums >
. Google Pocket Book ->
. Google Collection ->

1 comment on original post
Denis Labelle's profile photo
Video Guide To Google+ >
Add a comment...

Rafael Teixeira

Shared publicly  - 
A tremendously good  #bruceschneier  seminar.

Listen to all of it, it is really #important .
Adrian Magdas's profile photo
Add a comment...

Rafael Teixeira

Shared publicly  - 
Add a comment...
Rafael's Collections
Have him in circles
683 people
Ashish Sharma's profile photo
Pasi Ääpälä's profile photo
Francisco Figueiredo Jr.'s profile photo
Natalie Stewart's profile photo
Home Decoration and Furnishing's profile photo
TechDeem's profile photo
khokan mondal's profile photo
Lorin Olsen's profile photo
Robotics's profile photo
14 communities
Software Developer
Development of any kind of software on many platforms, using languages like C#, Javascript, Java, C/C++ ...
Basic Information
Other names
aka: Monoman. Just an old programmer... From Algol to Ada, from Basic to Boo, from Cobol to C#, etc...
Linux User since 2001
Open Source Hacker since 2000
Father since 1998
Husband since 1995
BSEE since 1985
Software Developer since 1978
A Fat Guy since 1968
The Owner of This Body since 1961
A Wandering and Curious Conscience since before the Big Bang
Bragging rights
Lots of dreams yet to realize... So don't count me dead...
Collections Rafael is following
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
São Paulo, SP, Brasil
São Bernardo do Campo, SP, Brasil
Rafael Teixeira's +1's are the things they like, agree with, or want to recommend.
Thrower – Apps para Android no Google Play

Play through over 80 levels of fun and challenge, finding the right way to hit all green blocks in view, with a single touch. Jogue através

Why Generation Y Yuppies Are Unhappy - Wait But Why

Facebook742kTwitter0Google+0Pinterest0Say hi to Lucy. Lucy is part of Generation Y, the generation born between the late 1970s and the mid 1

UP - Intel x5-Z8300 board in a Raspberry Pi2 form factor by UP — Kicksta...

UP is raising funds for UP - Intel x5-Z8300 board in a Raspberry Pi2 form factor on Kickstarter! UP, the credit card computer board for make

Most Likely To Succeed

The feature-length documentary 'Most Likely To Succeed' examines the history of education in the United States, revealing the growing shortc

Unidade Paraíso, um coworking diferenciado em São Paulo - Lab 48 Coworking

O Lab 48 Coworking Unidade Paraíso - São Paulo se destaca por proporcionar uma experiência diferente da rotina comum de trabalho.

Astrobiologist David Grinspoon Asks Sci-fi Novelist Kim Stanley Robinson...

Humans will have a chance to prove their adaptability as the Earth undergoes unprecedented challenges in the Anthropocene, an era…By David G

Welcome to the Speakularity, Where Everything You Say Is Transcribed and...

We are going to start recording and automatically transcribing most of what we say. Instead of evaporating into memory, words spoken…By Jame

Google OnHub review—Google’s smart home Trojan horse is a $200 leap of f...

Today it's a $200 Wi-Fi router. Tomorrow? We have no idea. (Ok, maybe some idea.)

Black Eyed Peas XOXOXO Music Video on Vimeo

This is latest music video for the Black Eyed Peas. It was created by Dipdive Animation group. I'm one of the members on the team. Thanks fo

New design could finally help to bring fusion power closer to reality

It's an old joke that many fusion scientists have grown tired of hearing: Practical nuclear fusion power plants are just 30 years away—and a

Talking D20 Gaming Die #3DPrinting

The 20-sided die — or “d20” as it’s known to tabletop gamers — is an icon of geek culture. In this project we’ll 3D-print a jumbo d20 and ou

Analysis of Alphabet aka Google's new corporate structure

What does Google's decision to become Alphabet mean and why it matters, not just to Google but also to investors & Silicon Valley.

Happy Accidents

As a young cook, one of the things I learned quickly was to appreciate the process. Not every task has to come out perfectly, not every job

Roslyn and Mono - Miguel de Icaza

Hello Internet! I wanted to share some updates of Roslyn and Mono. We have been working towards using Roslyn in two scenarios. As the compil

managed-commons/Managed-Commons · GitHub

Managed-Commons - Managed Libraries for Mono/.NET

Refactoring Essentials for Visual Studio extension

Free refactorings for C# and Visual Basic (VB) - plus more!

Gemalto cria solução de tokenização universal

Plataforma de cartão virtual seguro compartilha infraestrutura para pagamentos em e-commerce e por aproximação, com HCE do Android, permitin

Slides da palestra sobre arquitetura do novo compilador do C# no DNAD 2015

No último sábado fiz uma palestra no .NET Architects Days 2015 (DNAD 2015) sobre a arquitetura do Roslyn, a nova plataforma de compilação do

Conley V8 Model Engines How They are Made

Conley V8 Model Engines how they are Made

Good Food! Too crowded food plaza!
Public - 8 months ago
reviewed 8 months ago
8 reviews