Stm32F446XX , TIM2 Frequency measurement using input capture giving inconsistent captures
Hi
I think our discussion is off topic here.
The stm32 mcus forum at https://community.st.com would be a better place.
The answer here decribes in short a simple setup using a second timer as gating:timer:
http://electronics.stackexchange.com/questions/227596/direct-frequency-measurement-with-two-hw-timers
If you are interested in a full featured frequency counter look for reciprocal frequency counter principle.
Dieter