ADC + GPDMA output values are incorrect
I am using STM32H563 and using seven pins to read data, all through ADC1 with GPDMA1 Channel0 -2 Words internal FIFO. I connected all seven pins to ground, expecting to get all zeros or values close to zero, but the readings seem to fluctuate randomly.
Although the ADC values do increase when connected to Vcc (>3000) and decrease when connected to ground (<2000), how can I ensure that the readings are correct? Are there any settings that I should adjust?
uint16_t adcbuf[7] = {0};
HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);
HAL_ADC_Start_DMA(&hadc1, (uint32_t *)adcbuf, 7);
while(1) {
printf("ADCBUF: ");
for (int i = 0; i < 7; i++) {
printf("%d, ", adcbuf[i]);
}
printf("\r\n");
HAL_Delay(1000);
}

Below is the ADC1 configuration from my .ioc file. (All ranks are configured identically, except for the channel.)


Below is the GPDMA1 configuration. (Use Standard Request Mode)


