我使用TIM8的ETR 做输入触发线,来触发ADC3 ,但是ADC的读取(触发)频率是ETR线输入频率的1/2,不知如何调整,求支招?
TIM8的设置如下。
void TIM8_ETR_GetDropCounts_Configuration(void)
{
TIM_TimeBaseStructure.TIM_Prescaler = 0x00;
TIM_TimeBaseStructure.TIM_Period =1;
TIM_TimeBaseStructure.TIM_ClockDivision = 0x0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseInit(TIM8, &TIM_TimeBaseStructure); // Time base configuration
TIM_ETRClockMode2Config(TIM8, TIM_ExtTRGPSC_OFF, TIM_ExtTRGPolarity_NonInverted, 0);
TIM_SetCounter(TIM8, 0);
TIM_Cmd(TIM8, ENABLE);
}
|