cancel
Showing results for 
Search instead for 
Did you mean: 

OPAMP -> ADC continuous reads reduces value. Using STM32G473CCU

Harry-Cornelis
Associate

Hi,

We made a board with STM32G473CCU and we are using OPAMP2 as follower internally connected to ADC2 to read a thermistor currently at 720mV. We find that the value given by ADC reduces if we read continuously and only becomes stable if we wait at least 2000ms between reads. Code summary:

ADC_Enable(&hadc2);

HAL_Delay(2000); // needed or read value reduces

HAL_ADCEx_Calibration_Start(&hadc2, ADC_SINGLE_ENDED);

HAL_ADC_PollForConversion(&hadc2, 2000);

debug1 = 3300 * HAL_ADC_GetValue(&hadc2) / 0xFFF;

With 2000ms or more wait between reads we get ~1730mV, with more regular reads this drops and with continuous mode it drops to 60mV

We also found that 2450 - debug1 gives a reasonable reading with 2000ms delay in-between.

Why does the voltage of ADC drop when reading regularly despite the opamp buffer?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
MasterT
Lead

Post op-amp initialization code, is it started?

View solution in original post

2 REPLIES 2
MasterT
Lead

Post op-amp initialization code, is it started?

Harry-Cornelis
Associate

Indeed we missed HAL_OPAMP_Start(&hopamp2);

It works fine now!

Thank you!