main()
{
ADC3_CH12_DMA_Config();
/* Start ADC3 Software Conversion */
ADC_SoftwareStartConv(ADC3);
}
void ADC3_CH12_DMA_Config(void)
{ADC_InitTypeDef ADC_InitStructure;
ADC_CommonInitTypeDef ADC_CommonInitStructure;
DMA_InitTypeDef DMA_InitStructure;
GPIO_InitTypeDef GPIO_InitStructure;
/* Enable ADC3, DMA2 and GPIO clocks ****************************************/
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA2 | RCC_AHB1Periph_GPIOF, ENABLE);//¿ªÊ±ÖÓ£¬ADC3ËùÔÚDMAʱÖÓ£¬ADC3Òý½ÅËùÔÚGPIO·Ö×éʱÖÓ£¬
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC3, ENABLE);//¿ªÊ±ÖÓ£¬ADC3ƬÄÚÍâÉèʱÖÓ
/* DMA2 Stream0 channel0 configuration **************************************/
DMA_InitStructure.DMA_Channel = DMA_Channel_2; //DMAͨµÀ
DMA_InitStructure.DMA_P