STM32f103c8T6 inaccurate ADC readings
Hello, I'm using stm32f103c8t6 board and trying to get simple voltage divider readings. I'm also using multimeter to measure voltage and well I'm getting 0.2 sometimes 0.4 V error. Is this normal? I really need precision, 0.2 or 0,4 volts are really to much for me. I'm using regular conversion on 1 channel every 10 seconds with maximum 239.5 cycles sampling time. This is the code I use (yes I try to calibrate it and that doesn't work)
HAL_ADCEx_Calibration_Start(&hadc1);
HAL_Delay(10);
HAL_ADC_Start(&hadc1);
HAL_ADC_PollForConversion(&hadc1,100);
ADC_VAL=HAL_ADC_GetValue(&hadc1);
HAL_ADC_Stop(&hadc1);
voltage=ADC_VAL*3.3/4096;
#[STM32 MCUs] #ADC #STM32F1
