2023-04-03 07:29 AM
I am using timer interrupt to measure the frequency of a square signal. When no signal is detected, I want to set the frequency to 0. The problem is that the frequency keeps the value it got at the last interrupt. Is there some way so that I can trigger one single interrupt after a certain timeout after the last rising edge of my signal ? I want to trigger that interrupt only once after each end of signal.
2023-04-03 08:16 AM
Use one timer to measure 1 second, and use another timer to count the input signal as timer's clock.
You will get Hertz value, including the ZERO hertz.
It is possible to invert the scheme, then you need to count the timer capture overflows....
2023-04-04 12:59 AM
Hmmm I don’t quite get how to configure the timers for that purpose in Cube. Can you explain further maybe ?