USB-C for UART TX/RX suggestion - Feedback please - Page 1
Forum section: electronics / projects

author: sebmadgwick
author_rank: Regular Contributor
timestamp: April 14, 2019, 09:23:46 pm
content: I am designing a product that has two interfaces: USB 2.0 and UART. These interfaces will not be used at the same time. I would like for both interfaces to be accessed by a single USB-C receptacle.TheUSB-C connector specificationdescribes how a USB-C connector can be used for propriety signals. "Alternate Mode" is the most flexible but would significantly increase the complexity of the product. "Debug Accessory mode" seems like the ideal candidate but presents three issues:Detecting connected pull-downs on CC1/CC2 may be difficult given that these lines must already be pulled down on the product itself.This mode can only be used with custom USB cables. This adds cost, complexity, and the risk of user error.The specification states that "This mode is for debug only and shall not be used for communicating with commercial products."I'm considering the use of "Audio Accessory Mode" to provide access to the UART for the following reasons:Substituting a UART TX signal for a mono audio channel, and UART RX signal for a mic input would not violate the specification.The connection of an audio accessory is easier to detect as it is indicated by both CC lines being connected to ground.USB-C to 3.5 mm 'converters' are commonly available and avoid the cost and risk of custom cables.Many products already use 3.5 mm audio connectors for UART signals.As a side note - the unused mono channel could be used to provide a small amount of power (e.g. a few tens of mA) to the connected UART accessory.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: April 15, 2019, 12:48:04 am
content: Automatic mux'ing of the USB-C receptacle pins between UART and USB PHY can be achieved with theTUSB320andTS5USBA224. The TUSB320 would provide a hi/low signal when an audio accessory is detected and the TS5USBA224 would be controlled by this signal to switch the D+/D- signals.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: April 16, 2019, 08:21:38 pm
content: TheFSA1153is a mux specifically designed to route either UART or audio signals through the D+/D- connections of USB-C. The datasheet does not suggest how the mux could be used in conjunction with the USB-C specification. However, the USB-C specification would only allow D+/D- to be repurposed in Alternate Mode and Audio Accessory Mode. This gives me some confidence that using Audio Accessory Mode to expose UART connections is not a terrible idea.It's worth noting that theFSA1153connects "RXD" to D- which is the left audio channel in the USB-C specification. This would be compatible with commonly availableserial to 3.5 mm cablesthat use the left channel (tip of TRS) for TX.

author: fchk
author_rank: Frequent Contributor
timestamp: April 17, 2019, 02:38:56 pm
content: Does it have to be USB-C?It might be easier to use a Micro-AB socket and use the ID pin as a multiplexer input. Standard Micro-B cables leave this pin open, Micro-A plugs tie it to GND.Hirose has Micro-A plugs for making own cables.fchk

author: sebmadgwick
author_rank: Regular Contributor
timestamp: April 17, 2019, 03:33:25 pm
content: Quote from: fchk on April 17, 2019, 02:38:56 pmUSB-C is preferable for it's robustness among other reasons. Also, USB-C was designed to be repurposed for non-USB signals; it would be a shame not to take advantage of this and all the benefits that follow. For example, compatibility with commonly availableUSB-C to 3.5 mm adaptersandserial to 3.5 mm cables.

author: janoc
author_rank: Super Contributor
timestamp: April 17, 2019, 03:41:18 pm
content: Quote from: fchk on April 17, 2019, 02:38:56 pmDon't do this. Introducing non-standard cables and connector setups for a standard interface is a very bad idea that could end up even with hw damage when some unsuspecting schmuck plugs this in to e.g. an USB OTG cable (which uses the ID pin).