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.