Other Parts Discussed in Thread: BQ25896, TS5USBA224, TPS745, , TPS2546, , TS3A227E, TPS65987D
Hello,
I am working on a USB C electronic design for a handheld product with a single LiIon cell and would welcome your feedback. The TUSB320HAI/LAI is part of the design but my questions/concerns are fairly general. Please correct me where I am mistaken.
Due to the great many versions of USB and BC, together with backwards compatibility, I have come to the conclusion that a solid design must support both USB C and BC1.2 current advertisement, both in host/SRC role and in device/SNK. This is partly due to USB C specification (quoted below) and the fact that there are adapter cables that enable customers to plug just about anything into our product. Some customers will lose the charger and USB cables shipped with our product and try to use whatever they find in some old drawer. Some A->C adapter cables have a CC1 56k pull-up and some don't. The current advertisement from USB C and BC1.2 BCD could be contradictory. This makes the input current limiting feature in the bq25896 an actual real-world requirement (in addition to the weird BC1.2 DCP specification that in itself makes automatic input current limiting necessary - see quote 4.6 below).
"4.8.1.1 USB-based Chargers with USB Type-C Receptacles
* ...
* ...
* A USB-based charger with a USB Type-C receptacle (Source) which is not capable of data communication shall advertise USB Type-C Current of at least 1.5 A within tVBUSON of entering the Attached.SRC state and shall short D+ and D− together with a resistance less than 200 ohms. This will ensure backwards compatibility with legacy sinks which may use USB BC 1.2 for charger detection." USB C spec R2.0, p225
If this wasn't enough, there's the Audio Accessory with a +/- 3 V voltage swing on the USB C USB2.0 pins (which would break ESD protection and BC1.2 BCD circuit) and the Audio Accessory Charge-Through that some users will try to use to charge our product. I have not been able to figure out whether Audio Accessory may generate this AC signal or only consume it. But, IM not so HO the combined USB standards and proprietary designs are a downright mess, so I wouldn't be surprised if there is suddenly an addendum that allows Audio Accessory to generate the AC signal (if this isn't really the case).
My current design consists of the following:
- TI bq25896 Single LiIon Battery charger with automatic input power limiting and OTG boost mode
- TI TUSB320HAI/LAI USB Type-C Configuration Channel Logic and Port Control
- Diodes/Pericom PI3USB9201 Dual-Role USB Charging-Type Detector (Does TI have a corresponding IC?)
- TI TS5USBA224 USB 2.0 High-Speed (480 Mbps) and Audio Switches with Negative Signal Capability
- STM32L4+ MCU
- TI TPS745 LDO set to 3.12 V (for an unrelated but good reason)
- Only USB2.0 12 Mbps (this is MCU-based)
The design goal is a handheld MCU-based product that you can charge via USB C and connect to a PC. In this scenario the product is a device/SNK.
Alternatively you can connect e.g. a sensor via USB. In this scenario the product is a host/SRC.
The product will most likely never work with Audio Accessory but I want to avoid potential problems caused by a user attaching an Audio Accessory with charge-through (accounting for a potential future addendum).
Due to backwards compatibility, it is quite possible that the external sensor will be pre-USB C and require BC1.2 advertisement by a CDP host (our product). So, even if the MCU can do BC1.2 BCD in device role, there is need for a HW solution that does the CDP host advertisement (PI3USB9201).
There are a few pin compatible competitors to the TUSB320 series (PI5USB30216C/D and FUSB303) but the TUSB320HAI/LAI seems to be the best trade-off between functionality and ease of use. PI5USB30216C/D powers up in DRP Try.SNK when in pin control mode but if you want to change from SRC to SNK role (or vice versa) you must power cycle it, which is not necessary with the TUSB320HAI/LAI.
The TUSB320HAI/LAI datasheet is clear that to advertise USB C 3.0A you must power it from at least 3.5 V, but I don't foresee a need for a handheld to be able to source more than 0.5 A. Should it be needed, power supply OR-ing from both 3.12 V and OTG VBUS 5 V should do the trick. (I haven't verified this assumption - there might be a need for signal level shifting too.)
"4.6 Power
...
Notes: 1. USB BC 1.2 permits a power provider to be designed to support a level of power between 0.5 A and 1.5 A. If the USB BC 1.2 power provider does not support 1.5 A, then it is required to follow power droop requirements. A USB BC 1.2 power consumer may consume up to 1.5 A provided that the voltage does not drop below 2 V, which may occur at any level of power above 0.5 A.
...
All USB Type-C ports shall tolerate being connected to USB power source supplying default USB power, e.g. a host being connected to a legacy USB charger that always supplies VBUS." USB C spec R2.0, p217
"2.3.1 Source-to-Sink Attach/Detach Detection
Power is not applied to the USB Type-C host or hub receptacle (VBUS or VCONN) until the Source detects the presence of an attached device (Sink) port. When a Source-to-Sink attach is detected, the Source is expected to enable power to the receptacle and proceed to normal USB operation with the attached device. When a Source-to-Sink detach is detected, the port sourcing VBUS removes power." USB C spec R2.0, p33
It seems that the simplest is to let device/SNK be the default mode and make it possible for the user to temporarily reconfigure it to host/SRC. It's both a HW and an MCU USB SW question. In other words, the DRP roles are not practically usable. If the bq25896 doesn't ramp up quickly enough, we could violate the intention of the USB C specification (quote p33) and fall back to legacy support (quote p217), which may never damage the USB C attached device.
---
So far I have mostly described my current design and what lead to it. Hopefully there are experts in USB that could confirm or correct. Please provide feedback.
To the specific TUSB320HAI/LAI questions:
1. As somebody else has already pointed out in another post, the datasheet is incomplete/contradictive regarding the ADDR and PORT pins' floating voltage range - the internal pull-up/pull-down resistor values don't result in an idle voltage inside the ADDR and PORT floating voltage range. The question is whether the ADDR and PORT pins can successfully be driven directly by a modern MCU, including floating state. (I suppose the TI ARM core MCUs are fairly similar to the STM32L4+ in this aspect.) With the STM32L4+ the pins would probably be configured to analog (inputs). Or, should a tri-state buffer be used?
2. It seems clear that PORT is sampled when EN or EN_N is asserted, but is it also possible to change ADDR during an EN or EN_N deassert & assert cycle? A note at the bottom of datasheet p5 suggests this: "(2) Internal pullup and pulldown for PORT and ADDR are removed after the device has sampled EN = high or EN_N = low."
Thank you in advance
Niclas