Skip to main content
Visitor II
September 1, 2025
Question

STM32G431 – How to disable UCPD dead-battery pull-downs on PB4/PB6?

  • September 1, 2025
  • 1 reply
  • 247 views

Hello there, 

I'm using a STM32G431KBU and programming it using STM32 Cube IDE.

There are 2 pins, PB4 and PB6, both digital inputs, I'm having problem with. On both, I apply 5V with a 10K pull-up resistor, while the MCU is working is at 3V3, this should work fine, as both are five-volts tolerant (FT), as per datasheet. When connected to the pull-up resistor, the voltage on the pin drops to 1V7 - 1V6, while there is 3V3 on the pull-up resistor. 

It looks like there is a pull-down resistor configured on these pins, and according to the DS, these pull-down resistors are controlled by the level on PA9 and PA10:

igor88_0-1756738901434.png

I've tried to disable these before GPIO init, but it did not work:

igor88_1-1756738979268.png

igor88_2-1756738998042.png

Any recommendations on how to properly disable these internal pull-down resistors on PB4 and PB6?

    This topic has been closed for replies.

    1 reply

    Super User
    September 2, 2025

    > I've tried to disable these before GPIO init, but it did not work:

    Read out and check/post content of the PWR_CR3 register.

    Do you use UCPD in your program?

    JW