Need help for this problem : STM32G070 – PB15 GPIO input always reads LOW with internal pull-up enabled
Hi everyone,
I'm facing an issue while reading a tactile push button connected to PB15 on an STM32G070 series MCU.
The GPIO is configured as an input with an internal pull-up resistor. My expected behavior is:
Button not pressed: GPIO reads HIGH (1). Button pressed: GPIO reads LOW (0).
However, I'm always getting LOW (0), regardless of whether the button is pressed or released.
Here is what I've checked so far:
-
Verified continuity between the button and the MCU pin; it seems fine.
-
Checked the button pin configuration, it looks fine
-
Tried reading the GPIO raw value in code, but it consistently returns 0.
I'm not sure whether I'm missing any thing
Could anyone suggest what I should check next to debug this issue?
I've attached images of the relevant configuration for reference.
Thanks in advance for your help!





