cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt after a certain timeout after the last timer interrupt

MSadf.1
Associate II

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.

2 REPLIES 2
S.Ma
Principal

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....

Hmmm I don’t quite get how to configure the timers for that purpose in Cube. Can you explain further maybe ?