2025-06-12 3:05 AM - edited 2025-06-13 5:03 AM
Hello everyone,
I'm using the STM32L071CBT6 microcontroller and facing an issue with reading a digital input on GPIO pin PB15.
What I'm Trying to Do:
I’m using a buck converter with a 5V output to indicate the power status. The 5V output from the buck converter is connected to PB15, which is configured as a digital input on the STM32.
Setup:
Buck converter 5V output = GPIO PB15
Measured with multimeter: PB15 shows 5V when buck converter is ON
PB15 is configured in firmware as an input pin (floating or pull-down)
Problem:
Although PB15 is reading 5V on the pin when measured, the firmware logic that depends on PB15 being HIGH doesn't work.
What I’ve Checked:
The GPIO pin is correctly configured as input
Measured 5V directly at PB15
Tried enabling internal pull-down or external pull-down resistor
No response or logic change in the code when the 5V signal is applied
2025-06-12 6:08 AM - edited 2025-06-13 9:10 AM
Set it as an output and drive it high and verify that (a) the voltage goes high and (b) the IDR register reflects this.
Related/duplicate? Just a coincidence you two asked the same uncommon question?
STM32L071CBT6 issue While recieving Input for GPIO... - STMicroelectronics Community