F4的ADC工作方式在H7上同样适用,这个是早期F429的ADC做的说明:
就是下面程序中的:ADC_InitStructure.ADC_ContinuousConvMode的配置,使能不使能都没有关系的
/*ADC2的配置*****************************************************************/
ADC_InitStructure.ADC_Resolution = ADC_Resolution_12b;
ADC_InitStructure.ADC_ScanConvMode = DISABLE;
ADC_InitStructure.ADC_ContinuousConvMode = DISABLE;
ADC_InitStructure.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_None;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_CC2;
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
ADC_InitStructure.ADC_NbrOfConversion = 1;
/* ADC2 规则通道配置 */
ADC_Init(ADC2, &ADC_InitStructure);
ADC_RegularChannelConfig(ADC2, ADC_Channel_10, 1, ADC_SampleTime_480Cycles);
/* 使能 ADC2 */
ADC_Cmd(ADC2, ENABLE); |