The symptom
The board powers up from a laptop with a USB-A-to-C cable, so everything looks fine. Then someone plugs it into a phone charger or a USB-C port with a C-to-C cable and nothing happens: no power at all. The cause is almost always the CC wiring, because a USB-C source does not put 5 V on VBUS until it detects a device.
How CC detection works
A USB-C receptacle has two configuration-channel pins, CC1 (A5) and CC2 (B5). A cable carries only one CC wire, and which receptacle pin it lands on depends on which way round the plug is inserted. The two ends talk through resistors:
- A source (charger, host port) pulls each of its CC pins up with Rp - a resistor or current source whose value advertises how much current it can supply (Default USB power, 1.5 A or 3.0 A). ST's AN5225 lists the current-source versions: 80 µA, 180 µA and 330 µA.
- A sink (your board) pulls each CC pin down with Rd = 5.1 kΩ ±10% to ground.
- The source watches its CC pins. When it sees Rd on one of them, a sink is attached, and it turns VBUS on. The voltage across Rd also tells the sink how much current it may draw.
Legacy USB-A-to-C cables contain their own Rp pull-up (56 kΩ for default USB power) and the USB-A host supplies VBUS unconditionally. That is why a board with missing or wrong Rd still works on those cables - the bug hides until someone uses a real USB-C source.
What a 5 V sink needs
- One 5.1 kΩ resistor from CC1 to GND.
- A second, separate 5.1 kΩ resistor from CC2 to GND.
- Nothing else on CC unless you use a USB-C/PD controller, which provides Rd itself.
That is all a device needs to receive 5 V from any compliant source. Place the resistors near the connector. If you need more than 5 V or more than the default current, use a USB Power Delivery sink controller instead of resistors.
The mistakes that break it
1. One resistor shared by CC1 and CC2
Tying CC1 and CC2 together and adding a single 5.1 kΩ looks like it saves a part. Without a special cable it can work, but the source now sees Rd on both CC lines at once. In the Type-C detection scheme summarised in AN5225, Rd on both lines means a debug accessory, and a cable with an electronic marker adds Ra to the picture, which can look like an audio adapter accessory. Sources are free to refuse power in either case. Each CC pin needs its own resistor.
2. A missing resistor on one CC pin
With Rd only on CC1, the board works in one plug orientation and is dead when the plug is flipped. It is easy to miss on the bench because you always plug the cable in the same way.
3. The wrong value
10 kΩ, 4.7 kΩ from the wrong series, or 56 kΩ copied from a cable schematic all show up in real designs. Rd must be 5.1 kΩ ±10% (4.59 to 5.61 kΩ). Outside that window the source may not detect the sink, or misread the advertised current.
4. Rd connected to VBUS instead of GND
A 5.1 kΩ resistor from CC to VBUS or 5 V is a pull-up, not a pull-down. It turns the port into something that looks like a (badly behaved) source.
While you are at the connector: D+ and D-
A USB 2.0 Type-C receptacle has two D+ pins (A6, B6) and two D- pins (A7, B7), one pair per plug orientation. Join A6 to B6 and A7 to B7 right at the connector. If only one row is wired, USB data works with the plug one way round and the device disappears when it is flipped. Also check that D+ really lands on the chip's D+ pin: on an ESP32-S3 that is GPIO20 (GPIO19 is D-), on an STM32 it is PA12 (PA11 is D-), and on a CH340 it is UD+.
Add a low-capacitance ESD array (for example a USBLC6-2) between the connector and the chip, as ST's AN4879 recommends for USB full-speed designs, and keep it close to the connector.
Checklist
- CC1 has its own 5.1 kΩ to GND; CC2 has its own 5.1 kΩ to GND.
- CC1 and CC2 are not connected to each other.
- No pull-up on CC unless the port is meant to be a source or dual-role port.
- A6+B6 joined as D+, A7+B7 joined as D-, both routed to the right chip pins.
- ESD protection on D+/D-, and on VBUS if the port faces the outside world.
- Test with a real USB-C charger and a C-to-C cable, in both plug orientations.
The checker covers these as CC resistors, D+/D- on both rows, D+/D- swaps and USB ESD. The ESP32-S3 sample board on the home page has the shared-resistor mistake on purpose, so you can see what the finding looks like.
Primary sources
- USB-IF: USB Type-C Cable and Connector Specification
- ST AN5225: Introduction to USB Type-C Power Delivery for STM32 MCUs and MPUs (Rd value and attach-detection table)
- ST AN4879: USB hardware and PCB guidelines using STM32 MCUs (ESD protection)
Summary for hobby and prototype designs; for certified products follow the full USB-IF specification.