I am not sure why I keep getting around .3 - .4 V even when the measured input is at 0V using a hand-held DMM. It's hard to imagine my ground noise is that high. Do you think it could be a software issue?
Here are the codes for reading ADC value. The reference voltage is 3.3V.
G_ADC_conv_ready = 0;
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
double temp_volt = 0;
if (__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_EOC))
temp_volt = HAL_ADC_GetValue(hadc);
G_PackVoltage = (temp_volt/4095.0) * 3.30;
G_ADC_conv_ready = 1;