STM32H7系列使用ADC DMA功能时读数问题
我开的路ADC但是两个ADC值之间相互影响,当我接一个GPIO的ADC时另一个GPIO的ADC值也会变
```c
#define ADC_CONVERTED_DATA_BUFFER_SIZE ((uint32_t) 100)
ALIGN_32BYTES (static uint16_t aADCxConvertedData[ADC_CONVERTED_DATA_BUFFER_SIZE]) __attribute__((section(".ARM.__at_0x24000000")));
//uint16_t aADCxConvertedData[1];
void ShowADCResult(void)
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/13ca562eed744157be6b4255132dd1f0.png "#left")
{
uint32_t ad1,ad2;
uint16_t i;
for(i = 0,ad1=0,ad2=0; i < ADC_CONVERTED_DATA_BUFFER_SIZE;)
{
ad1 += aADCxConvertedData[i++];
ad2 += aADCxConvertedData[i++];
}
ad1 /= 50;//累加50次,???后求均???
ad2 /= 50;
printf("\r\n******** ADC DMA Example ********\r\n\r\n");
printf(" AD1 value = %dV \r\n", ad1);//转换后的真实电压*3.3f/65536
printf(" AD2 value = %dV \r\n", ad2);
}