I'm going to copy a lot from PD Buddy Sink and any PD projects I can get my hands on. The firmware uses ChibiOS so I'll have to convert.
The USB PD is usually handled by a dedicated chip via I2C. I'd need 2 - one to negotiate with phone, the other to negotiate with charger. Or one that handles multiple.
Doing it on the STM32 may complicate code. Some STM32 chips have a PD ability like STM32L5, STM32G0, STM32G4
voltage regulator for chip/logic
I could just stick with 5V (for easy data lines) and support 5v 3a fast charging
PD Buddy Sink uses AP2204R-3.3TRG1 for 3.3v, and I think the FUSB302 can negotiate 3.3v data
OtterPill has a SY8201 to provide 3.3v
I'm going to copy a lot from PD Buddy Sink and any PD projects I can get my hands on. The firmware uses ChibiOS so I'll have to convert.
The USB PD is usually handled by a dedicated chip via I2C. I'd need 2 - one to negotiate with phone, the other to negotiate with charger. Or one that handles multiple. Doing it on the STM32 may complicate code. Some STM32 chips have a PD ability like STM32L5, STM32G0, STM32G4
FUSB302BMPX https://www.onsemi.com/products/interfaces/usb-type-c/fusb302b Used by PD Buddy Sink and OtterPill breakout board
STUSB4500 with stm32 example (not using chibi os) https://github.com/usb-c/STUSB4500 can be programmed standalone without a micro https://hackaday.com/2019/10/18/usb-power-delivery-for-all-the-things/
EJ899 used on no-name usb hub
voltage regulator for chip/logic I could just stick with 5V (for easy data lines) and support 5v 3a fast charging PD Buddy Sink uses AP2204R-3.3TRG1 for 3.3v, and I think the FUSB302 can negotiate 3.3v data OtterPill has a SY8201 to provide 3.3v