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-02-23 10:35 PM
yes I have read the summary, it described my observations in detail.
only reason I have mentioned External ADC because on one board Which was working External ADC was not working reason : dry soldered Pullups. so I thought its a important point to debug my issue.
Anyways I have edited my post and I will post updates as i debug more
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