TCPP03-M20 + STM32 - enable USB bootloader in dead battery mode
Hi,
i am using STM32G0B1KB and the UCPD peripherals to implement an USB-PD device with 2 ports:
- Port 1 is DRP & DRD device, USB FS data via STM32 USB peripheral, using TCPP03-M20.
- Port 2 is Source only, not USB data capable, using TCPP02-M18.
For port 1, I want to use the example schematic from the TCPP03-M20 datasheet, chapter "8.3
Single bi-directional power path", using just one pair of MOSFETs. The 3.3V for the STM32 will be generated from the "internal" VBUS voltage (labelled "Consumer and provider paths" in the datasheet), i.e. only available when the MOSFETs are "ON".
I will connect the UCPD1_DBCCx pins to the UCPD1_CCx pins to enable the pull-down resistors in "dead battery" state.
I would also like to enable firmware upgrades using the USB bootloader in system memory and a simple button connected to BOOT0, even when no internal power is available ("dead battery" mode).
Is this enough to enable firmware upgrades even in dead battery mode?
In my understanding, it should work as follows:
- Device is unpowered (dead battery).
- User connects device to USB host/DFP (e.g. smartphone or computer) while holding BOOT0 button
- Host recognizes the dead-battery resistors and enables Vbus=5V
- TCPP03-M20 automatically enables the MOSFETs even though there is no internal power (EN=0)
- Internal power turns on, 3.3V becomes available, MCU boots
- MCU recognizes BOOT0=1, starts bootloader from system memory
- Bootloader allows firmware upgrades
Is this correct? Do I need a pull-up on the TCPP03-M20's "EN" pin as it is connected to a STM32 GPIO and the bootloader does not set it to "high"?
Thanks!
