pwm: stm32: Improve capture by tuning counter prescaler
Currently, capture is based on timeout window to configure prescaler. PWM capture framework provides 1s window at the time of writing. There's place for improvement, after input signal has been captured once: - Finer tune counter clock prescaler, by using 1st capture result (with arbitrary margin). - Do a 2nd capture, with scaled capture window. This increases accuracy, especially at high rates. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: NThierry Reding <thierry.reding@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
Showing
想要评论请 注册 或 登录