cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 series PA1 pin always has a 3.3V voltage

GCT
Associate

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?

3 REPLIES 3
Uwe Bonnes
Principal III

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.

> 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

GCT
Associate

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.