STM32G030C8T6 temperature sensor and oversampling issue
I’m trying to use ADC oversampling and noticed that temperature value is distorted in that case.
I have configured ADC with 7 external inputs, temperature sensor input and Vref input. Vcc/Vcca is 3.27V, sampling time is 7.5 cycles.
When oversampling is disabled - I’ve got averaged raw value 2115 for analog input (voltage 1.64V), 1005 for temperature sensor and 1582 for Vref. When oversampling is enabled (no matter 2x or 16x, with shifting to same count of bits as added by oversampling) - I’ve got 2115 for analog input, 1107 (!!) for temperature sensor and 1584 for Vref. So, only temperature sensor input value differs. And, as result, I’ve got 63*C instead of 33*C when oversampling is enabled.
What’s wrong with oversampling? Can it be fixed by some kind of settings? Or I must forget about it and use software oversampling instead?
I’m using latest CubeIDE 2.2.0 and CubeMX 6.18.1 with latest libs 1.6.3.
