for my application, I decided to use USB Type C Power Delivery in combination with the STUSB4500 (Datasheet: https://www.st.com/resource/en/datasheet/stusb4500.pdf) sink controller that helps to negotiate a contract with the power source more or less by itself.

Now my application (referred to below as 'device') draws about 1.5 A during power up, roughly 800 mA during regular operation, and 1.5 A worst case. It uses an STM32F0 microcontroller (referred to below as 'microcontroller') to exchange data between the microcontroller and the computer using its virtual com port (D+ and D- used, 12 MBit/s USB 1.0 full speed specification) with the computer. The device is either used

  • offline. Only running on power delivered by USB
  • or online, talking to the computer using the microcontroller for settings and firmware updates via DFU mode

Hooking up the device to a computer with native USB Type C support (MacBook Pro, the one with butterfly keyboard and USB C) is no big deal. It works fine as a PD contract is correctly negotiated. But now I hope to make it work on older computers too that only have USB 2.0/3.0 (like my MacBook Air 2013) where it is connected via a USB A to USB C cable (like this one here: https://www.amazon.de/AmazonBasics-USB-Kabel-Meter-Schwarz/dp/B01GGKYKQM). I know the port of my MacBook is capable of charging my iPhone and iPad at 2100mA, however it is apparently not able to talk to STUSB4500. As a result, as the application wants to have 1.5A on startup, it doesn't power up at all.

I came up with one not optimal solution and would like to ask you about what a better solution could be:

My solution so far would use the PDO2 and PDO3 pins of the STUSB4500 to determine the case that no contract is negotiated (that seems to be the case when it is connected to an USB 2.0/3.0 port) and uses their High-Z state, according to configuration 2, to keep transistors off, that switch on the high current part which is actually responsible for drawing up to 1.5 A. This will make the USB 2.0/3.0 computer successfully recognize the device. And then, by negotiating more power with the computer after the microcontroller is detected, it can either turn on the high current part or keep it turned off. This solution is obviously flawed, because when using the device offline using a plain USB A connector charger and an USB A to USB Type C cable it wouldn't turn on at all, as the charger will never talk to the microcontroller.

So what would you do to make a high power device using USB Type C power delivery compatible to an 'old' USB A only computer AND a 'plain' USB A charger?

Any help is greatly appreciated.

Thank you, stay safe and cheers.

  • \$\begingroup\$ Why not use stm32g071 and dump stusb4500? \$\endgroup\$ – Carl Gilbert May 9 '20 at 0:30

what would you do to make a high power device using USB Type C power delivery compatible to an 'old' USB A only computer

High-power bus-powered USB Type-C device is INCOMPATIBLE with regular USB-A ports, period. So the standard solution is to provide an external 5V 2A AC-DC power adapter.

As a user-friendly feature, all you can do is to provide a non-standard TypeC-TypeA cable (with 22k pull-up) with your device, and pray that the Type-A port on user side can handle 1.5A load without significant drop of voltage. A a safety, you can implement voltage drop control on your side and disengage if the host port is too weak for 1.5A.

AND a 'plain' USB A charger?

Plain USB-A chargers most frequently have DCP signature (D+ D- shorted), so implementing a D+/D- short check will provide you with desired power. I believe there are C-C controller ICs that can do the BC1.2 and DCP check.

And since you are fine with standard 5V 1.5A power, you don't need any PD complexity. The standard Type-C Rp/Rd signaling logic will do the job without any Power Delivery contract negotiations.

  • \$\begingroup\$ Thank you for clarifying. Is my understanding correct that the Rp/Rd signaling is determined by what type of cable I use and not from the sink side? \$\endgroup\$ – LM358 May 9 '20 at 13:07
  • \$\begingroup\$ @LM358, In native C-C connection the type of link partners is determined by sockets, and the info is propagated over CC wire. In case of legacy cable assemblies, then yes, the type is determined by local resistors placed inside cable's overmolds. \$\endgroup\$ – Ale..chenski May 9 '20 at 16:06

USB A to USB C cable

The Rp - which determines current - is included in these, and you can buy cables with all 3 (default, 1.5A, 3A) resistor values. Unfortunately this value is almost never specified in a product listing, so you will need to measure the Rp value yourself.

Note: Never use 3A USBA-to-C cables, these are not safe anywhere IMHO.

Using a cable with the Rp at 1.5A setting, you should be able to power up your circuit. This may technically violate USB2.0 specs and look a bit dangerous, but USB 2.0 2.5" HDDs used to operate in the 1-1.5A current range regardless. That is why these are somewhat picky about USB ports.

Otherwise you cannot really escape this mess - a PC host will only be able to negotiate up to 500mA, as this is the limit in USB2.0 spec. Also the USB-A charging port on an Apple device will not follow USB battery spec.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.