2026-02-12 12:29 AM - edited 2026-02-12 12:43 AM
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)
Solved! Go to Solution.
2026-02-22 11:28 PM
Hi TDK,
I've found the problem—many of my soldered pins appear to have cold solder joints, Vref+ being one of them. By the way, I'm using a Nucleo-H563ZI, so many pins don't have headers. Thanks for your help!
2026-02-15 10:12 PM
What board are you using? If custom, please show the schematic. Perhaps VREF+ is not provided or is lacking capacitance or is otherwise unstable.
What pins are you using? Perhaps instead of 7, just choose one for now.
2026-02-22 11:28 PM
Hi TDK,
I've found the problem—many of my soldered pins appear to have cold solder joints, Vref+ being one of them. By the way, I'm using a Nucleo-H563ZI, so many pins don't have headers. Thanks for your help!