Skip to main content
Visitor II
May 30, 2024
Question

STM32F4 series PA1 pin always has a 3.3V voltage

  • May 30, 2024
  • 4 replies
  • 1762 views

Hi all,

I am using a mass-produced PCB board for a project, the chip model is STM32F429BIT6. The PA1 pin is used as ADC1-IN1 for access to the sensor.

However, I found a strange phenomenon that after configuring the ADC, the initial reading of the pin was a value such as 4092. But that's not to say that ADC doesn't work, because the number varies, sometimes it's 4089, sometimes it's 4091, it changes. Everything measured with this pin is 4092, but GND value is correct, almost single digits.

I found the problem, but I don't know what's causing it. After measuring this pin with a multimeter, it is itself with 3.3v voltage, even if it is configured as `GPIO_MODE_ANALOG` in the code, changing `GPIO_InitStruct.Pull` to pull up or pull down, still does not work.

At first I thought it was a problem with my code configuration, because I modified it based on someone else's code, but I used 'CubeMX' to create a new blank project and configure the PA1 pin, only read the ADC value without adding additional code, the same problem, both HAL library and LL library.

Due to the suspected hardware circuit problem, I changed a PCB board, the model is F429VET6, this board is bought online, nothing connected. Also with `CubeMX` to build new projects as above, still the same problem. When I took the measurement after a whole chip erase, according to the data manual, GPIO should be in floating state by default, but PA1 pin still has 3.3V voltage!

I am wandering why? What's the solution?

    This topic has been closed for replies.

    4 replies

    Graduate II
    May 30, 2024

    Check with a debugger the actual settings of GPIOA Pin1. Maybe some runaway code causes your problem. And recheck all connections on PA1, as the problem is very probaly on your side.

    Super User
    May 30, 2024

    > Everything measured with this pin is 4092, but GND value is correct, almost single digits.

    What does this mean? That if you ground the pin the ADC readings go to 0?

    > After measuring this pin with a multimeter, it is itself with 3.3v voltage

    If the ADC conversions are running during this test, this may be normal.

    Unlike your multimeter, the ADC input is *not* high impedance. Rather, it's your responsibility to connect an appropriate low-impedance signal source to it.

    JW

    GCTAuthor
    Visitor II
    May 31, 2024

    With `GPIO_MODE_OUTPUT_PP` and `GPIO_NOPULL`, the pin voltage is fine.

    but `GPIO_MODE_ANALOG` or `GPIO_MODE_INPUT`, the voltage is 3.3V. That's strange.

    Visitor II
    July 23, 2025

    @GCT  Did you happen to figure out what was going on with the pin? I'm seeing a similar issue, but with an STM32H753.

    EDIT: Turns out the 3.3V we were seeing was due to some input filters on our board, not the STM32 pins themselves. But I'm still curious if there is a potential issue we'll need to address.