Hi,
I think that the best idea is to use the FTM module in its Input Capture configuration, please refer to the FTM module in the Reference Manual Reference manual in the section Input Capture Mode. The input capture module has the task of capturing the current value of the timer counter upon an input event. This module is mainly used for the frequency or time period measurements and pulse measurements.
When using Input Capture mode remember that the maximum frequency for the channel input signal to be detected correctly is system clock divided by 4, which is required to meet Nyquist criteria for signal sampling.
You may find useful this thread:
Re: How can I measure frequency (0 - 100KHz) of a signal using a K10 microcontroller?
I hope this information can help you.
Regards,
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. It would be nice!
-----------------------------------------------------------------------------------------------------------------------