| Electronics > Projects, Designs, and Technical Stuff |
| USB-C for UART TX/RX suggestion - Feedback please |
| (1/2) > >> |
| sebmadgwick:
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. The USB-C connector specification describes 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. |
| sebmadgwick:
Automatic mux'ing of the USB-C receptacle pins between UART and USB PHY can be achieved with the TUSB320 and TS5USBA224. 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. |
| sebmadgwick:
The FSA1153 is 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 the FSA1153 connects "RXD" to D- which is the left audio channel in the USB-C specification. This would be compatible with commonly available serial to 3.5 mm cables that use the left channel (tip of TRS) for TX. |
| fchk:
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 |
| sebmadgwick:
--- Quote from: fchk on April 17, 2019, 02:38:56 pm ---Does it have to be USB-C? --- End quote --- USB-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 available USB-C to 3.5 mm adapters and serial to 3.5 mm cables. |
| Navigation |
| Message Index |
| Next page |