-
关于GD32F507官方例程中的ADC0、ADC1并行采样例程
例程中ADC0的采样结果通过DMA0搬移到adc_value中,但是ADC1的转换结果呢?代码中并没有读取对ADC1的转换结果啊,是我理解错了吗?uint32_tadc_value[2];intmain(void){/*systemclocksconfiguration*/rcu_config();/*systickconfiguration*/systick_config();/*GPIOconfiguration*/gpio_config();/*configureCOMport*/gd_eval_com_init(EVAL_COM0);/*TIMERconfiguration*/timer_config();/*DMAconfiguration*/dma_config();/*ADCconfiguration*/adc_config();/*enableTIMER1*/timer_enable(TIMER1);while(1){delay_1ms(1000);printf("\nadc_value[0]=%08X\n",adc_value[0]);printf("\nadc_value[1]=%08X\n",adc_value[1]);printf("\n*******************\n");}}/*!\briefconfigurethedifferentsystemclocks\paramnone\param[out]none\retvalnone*/voidrcu_config(void){/*enableGPIOclock*/rcu_periph_clock_enable(RCU_GPIOA);rcu_periph_clock_enable(RCU_GPIOC);/*enableADC0clock*/rcu_periph_clock_enable(RCU_ADC0);/*enableADC1clock*/rcu_periph_clock_enable(RCU_ADC1);/*enableDMA0clock*/rcu_periph_clock_enable(RCU_DMA0);/*enabletimer1clock*/rcu_periph_clock_enable(RCU_TIMER1);/*configADCclock*/rcu_adc_clock_config(RCU_CKADC_CKAPB2_DIV6);}/*!\briefconfiguretheGPIOperipheral\paramnone\param[out]none\retvalnone*/voidgpio_config(void){/*configtheGPIOasanalogmode*/gpio_init(GPIOA,GPIO_MODE_AIN,GPIO_OSPEED_MAX,GPIO_PIN_0);gpio_init(GPIOC,GPIO_MODE_AIN,GPIO_OSPEED_MAX,GPIO_PIN_0);}/*!\briefconfiguretheDMAperipheral\paramnone\param[out]none\retvalnone*/voiddma_config(void){/*ADC_DMA_channelconfiguration*/dma_parameter_structdma_data_parameter;/*ADCDMA_channelconfiguration*/dma_deinit(DMA0,DMA_CH0);/*initializeDMAdatamode*/dma_data_parameter.periph_addr=(
2022-08-12 8