I have been using the PCNT module in the ESP32 for frequency measurement of signals with frequencies between 100 Hz and 1 kHz. It has worked very well, but now I am facing the challenge of measuring the frequency of very slow signals (on the order of 0.1 Hz).
I had previously measured such signals using an interrupt and a timer in software, where I would measure the time that had passed between interrupts and saved it into an array of a fixed size (say 5). I would then use a moving average to compute the frequency from the samples collected.
Do you have any recommendations on alternative approaches? Is there something that could be done "in hardware"? Say, that the ESP32 would automagically save the timestamp on each rising edge of the signal?