Skip to content
Commit d66ffb91 authored by Fabrice Gasnier's avatar Fabrice Gasnier Committed by Lee Jones
Browse files

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: default avatarFabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: default avatarThierry Reding <thierry.reding@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 53e38fe7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment