4 ms·
As a user, I liked USB-C. Until I had to implement this ridiculously overcomplicated garbage. To be spec-conform, you need at least 1 IC. You can theoretically
by kanetw 4y ago
As a user, I liked USB-C. Until I had to implement this ridiculously overcomplicated garbage.
To be spec-conform, you need at least 1 IC. You can theoretically hack a solution together with some resistors, but it's not spec conform. If you need the high-speed lanes, add a mux/redriver to un-flip it.
If you want power delivery (>15W), you need a PD controller and port protection (or a user will fry your data lines when they unplug the connector and put 20V on the data pins). 2 ICs right there, and one of them is basically a microcontroller, so you need to deal with more programming.
If you want alternate mode, you need to implement the entire PD stack and a redriver/mux. That's 2-3 ICs right there that have to work together (so usually a single vendor). And not all of them support alt mode.
Which, ok, fine. I'm not building a cost optimized product, I just want it to work well. Except literally none of the ICs are available. Because USB-C requires ICs for everything, it's all sold out (or total garbage that's not worth designing into a product, or requires vendor support to design the firmware, or or or).
- danhor 4y agoBut the two CC line resistors are spec-conform? That's how 5V sinks are supposed to work. I agree that the whole USB PD stack is way over complicated, I still don't get why the electrical layer and the on-the-wire protocol is so complex. Wouldn't a 3.3 V bidir UART with a CRC at the end do a fine job?
- kanetw 4y agoWithout CC line sensing, you don't know how much current you're allowed to draw. Screenshot from the standard: https://i.kane.cx/EI4HtM https://i.kane.cx/EI4HtM Specifically, the sink has to detect vRd to determine how much current it can actually draw. E: sorry, to clarify: 2 resistors is fine, but you also need line sensing. So that's at least a few comparators or an ADC or whatever. Or a dedicated IC.
- danhor 4y agoAh, the good 'ol legacy USB issue (for anything under 1.5A). The standard provides a way for simple devices (page 218, PSD), to just draw up to 500mA [0]. But TBH, legacy USB charging is such a mess, I'd just always assume 1.5A and hope for the best. (for USB 3.0 900mA you at least need a USB Device to detect it, I'm not sure if a 3.0 device is needed). [0]: 500mA in default current and the other options provide more current. EDIT: Mmh, you still need to detect above vRa voltage in "AttachWait.SNK", but you can assume default USB Current after that without specifically detecting it. I think no one cares about vRa. Still better than USB 2.0 (where without being a USB device you could only pull 100mA) or not much different than USB BC for DCPs (detect 200 Ω or smaller resistor between D+ and D-).
- kanetw 4y agoYeah, it always gives you default power. It's just such a low amount that I kinda forgot. Sometimes it's just fine to yolo it, but it adds to the confusion-- "I plugged in my device and it doesn't work??"