cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 CubeMX USB PD Configuration

AlexKlimaj
Associate II

I am working on getting the USB PD pins setup in CubeMX for a board I've just built. I am using the STM32G071CBT6.

I was not planning on using the Dead Battery functionality, so I connected the CC lines to PA8 and PB15 to use UCPD1. And USART1 to PA9, PA10, PA11, and PA12.

PA9 and PA10 are the dead battery connections for the UCPD1 controller. CubeMX will not let me configure UCPD1 because I have PA9 and PA10 configured for USART.

I suppose I could configure the UART and USB PD pins manually. Could CubeMX be updated to allow for this situation?

Thanks

5 REPLIES 5
Yohann M.
ST Employee

I can confirm that it is planned to provide a cubeMX version which allows to change Dead battery pins to USART pins (or other alternate pins of course).

If you want to use DB pins for another functions than DB pins, I would like to remind here the role of DB pins:

DB/ pin can be used in two ways:

• Either, DB pin is connected to VCC

• Else, DB pin is driven by a MCU GPIO

As long as DB pin is low or HI-Z (an internal 5 kΩ pull-down sets the level to ‘0’), dead battery resistors are

connected and CC switches are opened (OFF state).

When DB pin is tied to VCC, DB resistors are disconnected and CC switched are closed (ON state).

* DB/ usage in SNK or Sink mode:

After system power-up, DB/ pin must be keeped to 0. In this case Rd is set on board level.

If MCU decide to set Rd on UCPD level, DB/ pin must be set to 1.

* DB/ usage in SRC or Source mode:

DB/ pin must be tied to VCC

Then for safe behaviour, we suggest to keep the DB pins as their main roles in case of UCPD is used on the system.

I am trying to get my board to power on with a USB PD power supply. I have the same circuit on my CC lines as in MB1352-C02_Schematic.pdf. With an NMOS between the connector CC lines and the CC pins on the STM32G0. I then have the Dead Battery Pins connected to the CC pins. But when the board is off and I measure the resistance of either signal to ground, they are both high impedance, not the USB PD specified pulldown resistances.

OlivierR
ST Employee

DBCC1/2 pins are not "real" resistor, this explain what you observed.

MB1352 or STM32081B-EVAL handle VCONN on CC lines, these mos are used to isolate CC pins when VCONN is used.

In your case you must connect DBCC1 to CC1 and DBCC2 to CC2. This will activate the dead-battery mode.

MB1378 or STM32071B-DISCO shows how to handle Rd "outside" STM32G0, and add OVP.

In this case Rd is present on CC1 line, and OVP are located on CC1 & CC2 path.

T5 will handle Rd, and T2&T3 will handle OVP. Up to application to manage RD_CC1, ENCC2, ENCC1 and DOOR_SENSE signals.

AlexKlimaj
Associate II

Oliver, thanks for the answer. I see that now. So the STM32G0 can be directly connected to the CC signals on the USB C connector, but run the risk of over-voltage on the STM32 CC pins without the inline MOSFETs. But with the over-voltage protection, you cannot use the Dead Battery functionality built into the STM32G0.

OlivierR
ST Employee