各位STM32F4怎么用定时器触发ADC采样

2024-10-30 13:35:21
有1个网友回答
网友(1):

各位STM32F4怎么用定时器触发ADC采样
TIM_Period = 15624;
TIM_Prescaler = 35;
这样设置保证精确的每秒128次比较周期,即72000000÷(35+1)÷(15624+1)=128;
然后在ADC中设置:
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T2_CC2;
ADC_ExternalTrigConvCmd(ADC1, ENABLE);