cancel
Showing results for 
Search instead for 
Did you mean: 

TCPP03-M20 + STM32 - enable USB bootloader in dead battery mode

Erlkoenig
Associate III

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!

1 ACCEPTED SOLUTION

Accepted Solutions
MROUV.1
ST Employee

The EN pin determines the voltage reference for the I2C bus (either 1.8V or 3.3V) and activates the I2C functionality. It is crucial to link this pin to a GPIO that outputs the same voltage level as the I2C port.
Unlike a threshold-triggered I/O, this particular pin is activated dynamically. Therefore, it should be connected to a GPIO with a fast rise time rather than being tied to a 3.3V pull-up.

Best regards,
Mathieu

View solution in original post

4 REPLIES 4
MROUV.1
ST Employee

Hello,
Your understading is correct.

Pull-up resistor on EN pin is useless. GPIO output for EN pin must be push-pull no pull-up, no pull-down resistor.

Best regards,
Mathieu

Your understading is correct.

Fantastic, thanks!!

Pull-up resistor on EN pin is useless

Even for the time when there is no power to the MCU yet, and before the application code starts and has a chance to set the EN pin "high"?

MROUV.1
ST Employee

The EN pin determines the voltage reference for the I2C bus (either 1.8V or 3.3V) and activates the I2C functionality. It is crucial to link this pin to a GPIO that outputs the same voltage level as the I2C port.
Unlike a threshold-triggered I/O, this particular pin is activated dynamically. Therefore, it should be connected to a GPIO with a fast rise time rather than being tied to a 3.3V pull-up.

Best regards,
Mathieu

Alright, I understand! Thank you very much!