I am using Nucleo F446ze board. And trying to measure frequency from one of the GPIO pin(PA1) . I am using waveform generator to send input signal to PA1 pin . I am using TIM2 timer which is set to input capture mode on channel 2. My system clock is set to 180Mhz and APB1 timer clock to 90Mhz.
I want to measure frequency upto 5Mhz from PA1 . when i run timer with prescalar 0 ..i could measure freq upto 150Khz. Over 15Khz the input capture is not consistent.
Could anyone please guide me how so it configure TIM2 to measure frequency from 2Mhz to 5Mhz?
Thanks for help in advance.