Close

Note about USB Type-C and board programming

A project log for CLN17 V2: $12 BoM Closed-Loop Driver for NEMA17

A compact, silent, high-performance open-source closed-loop (servo) stepper motor driver with USB, CAN-FD and 48V support

anton-khrustalevAnton Khrustalev 09/26/2023 at 13:560 Comments

In many small-scale embedded projects, the Type-C connector has historically seen limited use. However, there's a noticeable shift towards its adoption in recent times.

For the most part, Type-C acts as an up-to-date substitute for the now-obsolete Mini-USB or Micro-USB connectors. Their primary roles have been to provide 5V power and to function as a USB2.0 interface. Let's sidestep the frequent oversight by some developers who forget to incorporate the 5.1k resistors.

Yet, the utility of Type-C extends far beyond merely replacing aged connectors!

Note: This discussion excludes Type-C configurations that necessitate USB3.0 or the 24-pin connector due to their intricate design.

A popular adaptation of Type-C is the 16-Pin variant:

Employing PowerDelivery can yield voltages and currents ranging from:

However, two pins in the connector – SBU1 and SBU2 – often remain untouched. They're designated for 'alternate modes' that rely on USB3.0 signaling lines. Since many projects bypass USB3.0, these pins stay dormant. But consider the potential: what if we repurpose these pins for debugging or programming? Imagine using them for the SWD or UART interfaces, both of which require just two lines! For example

In terms of compatibility, the Type-C standard dictates that the impedance of inactive SBU lines should exceed 950kOhm. With CMOS-based communications (like UART and SWD), this specification is almost always met. Additionally, if a Type-C cable lacks USB3.0 support, it likely won't carry SBU signal lines, eliminating potential concerns. And given the resilience of UART and SWD protocols, coupled with their data integrity checks, inadvertent mishaps are unlikely.

Advantages:

Drawbacks:

This is a raw note, will be corrected late

Linked project: #SWD over USB Type-C: New way of programming boards 

Discussions