stm32 timer pwm输入捕获理解
stm32 timer输入捕获计算公式:IC2Value=TIM_GetCapture2(TIM2);//获得CCR2的值pulse=TIM_GetCapture1(TIM2);//获得CCR1的值DutyCycle=pulse/IC2Value;Frequency=72000000/IC2Value;duty=(u32)(DutyCycle*100);freq=(Frequency/1000);