2024-10-23 12:40 PM
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
Solved! Go to Solution.
2024-10-23 02:58 PM
Post op-amp initialization code, is it started?
2024-10-23 02:58 PM
Post op-amp initialization code, is it started?
2024-10-24 05:31 AM - edited 2024-10-24 05:32 AM
Indeed we missed HAL_OPAMP_Start(&hopamp2);
It works fine now!
Thank you!