Skip to main content
Associate
February 23, 2026
Solved

STM32F072RBT6 ADC Channels IN0–IN13 Always Read 4095

  • February 23, 2026
  • 3 replies
  • 671 views

STM32F072RBT6 ADC Channels IN0–IN13 Always Read 4095, IN14–IN15 Work Normally

I have 5 boards based on STM32F072 
Peripherals connected 
SPI1(ATM90e36 Running at 3.3V and 3.3V spi pullups using 10k), i2c1(ADS1115 running at 5v and 5V pullups using 10k), Uart1,Uart2,Uart3 (all in async mode) , 9 internal ADC channels and other pins as GPIO attaching the snapshot of my config.
ISSUE : PC0,PC1,PC2,PC3,PA0,PA1,PA4 pins always reads 4095 and PC4 and PC5 reads 170-180 counts 
PC0-PA4 channels is connected to pressure sensor in this way 

Signal ── 4.7kΩ ── PC0 (ADC input) ── 10kΩ ── GND signal expected is 0-4.5V

PC4, PC5 are Pulled down using 4.7k (Series resistor for NTC).
directly reading VREFINT channel gives 4095 but it should be around 2000 
Hardware sanity checks:
GPIO toggle toggles the respective pin
GPIO Read give the actual digital reading
using EXTI it triggers the isr.
physically measure all pin voltages they are at 0 

Observation : Out of 5 boards 4 are showing same behavior and 1 board's ADC is working perfectly fine and showing 0-3 counts on all ADC pins. The board on which ADC was working I2c was not working ( dry solder on I2c Pullups ).
after observing this I have took 1 board which was never powered on, removed pullups but I was getting same issue with ADC

Best answer by mayurharge

The issue is resolved 
I was having a 5V RS485 on PA2 PA3 ,
after using the level shifter its solved

3 replies

mƎALLEm
Technical Moderator
February 23, 2026

Hello @mayurharge and welcome to the ST community,

Your issue is more related to the external ADC ADS1115 which is not ST product.

You said:

  • Pull-ups initially were 12 kΩ to 5 V

But in the ADS1115 datasheet. the range is 1K to 10K:

screenshot.png

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
Associate
February 23, 2026

@mƎALLEm i gues you have misread my issue.

External ADCs are working fine and I Can read all 3*4 = 12 channels.

The Issue i am facing is with internatial ADC specifically from CH0 to CH13.

(For testing i have enabled all adc pins  )

mƎALLEm
Technical Moderator
February 23, 2026

@mayurharge wrote:

@mƎALLEm i gues you have misread my issue.

External ADCs are working fine and I Can read all 3*4 = 12 channels.

The Issue i am facing is with internatial ADC specifically from CH0 to CH13.

(For testing i have enabled all adc pins  )


So the description was a bit confusing.

You need to be concise in the description of the issue. The AI seems not helping you to describe the problem.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
Ozone
Principal
February 23, 2026

> Boards originally assembled with 12 kΩ pull-ups to 5 V

How is that to interprete ?
The internal ADCs are not 5V-tolerant.
Never should the voltage on any such pin exceed the maximum declared in the DS, usually +3.6V.

Since you have not posted the whole schematics, I recommend to check the voltage level an ALL input pins while powered on.
The behavior you described is often caused by transient currents through protective components at inputs, e.g. analogue inputs.

mƎALLEm
Technical Moderator
February 23, 2026

@Ozone wrote:

> Boards originally assembled with 12 kΩ pull-ups to 5 V

How is that to interprete ?
The internal ADCs are not 5V-tolerant.
Never should the voltage on any such pin exceed the maximum declared in the DS, usually +3.6V.

Since you have not posted the whole schematics, I recommend to check the voltage level an ALL input pins while powered on.
The behavior you described is often caused by transient currents through protective components at inputs, e.g. analogue inputs.


He's using an external ADC chip (ADS1115 over I2C) from TI. I've already modified the title to make it clear.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
mayurhargeAuthorBest answer
Associate
March 7, 2026

The issue is resolved 
I was having a 5V RS485 on PA2 PA3 ,
after using the level shifter its solved