http://cache.baiducontent.com/c?m=9d78d513d98207f04fece47f0d01d7174a02d1743ca6c76409c3e03984145b563710f4bb56644b5bc7823c390ef50f1aa8e737012a1e65f2dedf883d80f9c57478de6323706bd71c4dce5ff58b11769737902cefaa18ecb9e732e5adc5d3a95744ca245f3cdfae&p=8b2a975fca9d5bff57ee947a5b47cc&newp=9133c64ad49614f543bd9b7d0d12cc231610db2151d2d401298ffe0cc4241a1a1a3aecbf21231a01d0ce786c0aaa4e57e1f03772350034f1f689df08d2ecce7e7add7d2f&user=baidu&fm=sc&query=stm32+adc+%CD%AC%B2%BD%A1%A1tim&qid=809b98c2000086f6&p1=4
void ADC_DMA_Config(void)
{
DMA_InitTypeDef DMA_InitStructure;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
DMA_DeInit(DMA1_Channel1); //DMA复位
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)&ADC1->DR; //外设的地址
DMA_InitStructure.DMA_MemoryBaseAddr = (u32)&ADC_ConvertedValue; //存储区的起始地址
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC; //DMA传输方向到内部存储区
DMA_InitStructure.DMA_BufferSize = ADC_NUM; //ADC转换的次数
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable; //外设地址不变
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable; //内存地址递增
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; //ADC数据长度为16位
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; //存储区数据长度为16位
DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;