2026-02-23 4:29 AM - edited 2026-02-23 10:29 PM
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
Solved! Go to Solution.
2026-03-07 12:54 AM
The issue is resolved
I was having a 5V RS485 on PA2 PA3 ,
after using the level shifter its solved
2026-02-23 5:15 AM
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:
2026-02-23 5:51 AM
> 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.
2026-02-23 5:56 AM - edited 2026-02-23 5:56 AM
@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.
2026-02-23 6:41 AM
@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 )
2026-02-23 6:43 AM
@Ozone internal ADC are never seeing 5v as there is a voltage divider on pressure sensor pins.
And those are the channels i am facing issue.
Attaching related schematics for your reference.
2026-02-23 9:10 AM
@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.
2026-02-23 6:01 PM
@mƎALLEm i am extremely sorry for using AI to generate the post.
I thought AI will better summarise my issue and the debug steps i have used to solve this .
Will it be better if i repost this issue in my own words?
2026-02-23 6:43 PM
> I thought AI will better summarise my issue and the debug steps i have used to solve this .
Did you read what it spit out? Did it do a good job summarizing the issue and providing a clear technical question?
If there is no problem with the external ADC there's no need to mention it.
The whole post doesn't make sense. Unsoldering I2C pullups will have no effect on ADC operation. How could they?
AI slop posts should be banned.
2026-02-23 10:33 PM
> @Ozone internal ADC are never seeing 5v as there is a voltage divider on pressure sensor pins.
This holds true for all GPIO pins which are not 5V-tolerant. ADC issues are a symptom, but the ADC pins are not necessarily the cause.
There might be a problem with Vref, alternatively. Some MCUs variants have separate Vref pins you need to connect to either VDDA or another reference voltage. An ADC value of 0xFFF only means the input voltage is at or above Vref.
Your initial post contains a lot of details that only confuse, and seen not relevant to the issue.
I would recommend to strip one board of all external 5V-operated peripherals, and check if the problem is gone. If that is relatively easy to do, of course.