How to calculate frequency of input signal?
Hi,
We are using STM32F746ZET6.
we have to calculate input frequency on 5 pins from 40khz to 0.01hz.
currently we are using 50 micro seconds timer and at every timer interrupt we are processing frequency calculation based on the polling of the pin status(high or low), with this approach currently we are able to capture the frequency bellow 1hz with good accuracy but for frequency higher then 500hz or more we are not getting proper results, currently for 20000hz(20khz) we are getting 20014hz.
we can not use GPIO interrupt other wise we will get frequent interrupts as there are total 5 pins.
currently we are capturing the input raising edge using timer capture mode but in this we are not able to detect frequency decimals points, as it only calculates raising edges then we read it at every one second so number of counts in 1 second will be our frequency.
but this is not giving us frequency in decimals, e.g 5.5hz, 18.9hz.
can we use timer input capture for calculating frequency without more interrupts?
