Skip to main content
MSadf.1
Associate II
April 3, 2023
Question

Interrupt after a certain timeout after the last timer interrupt

  • April 3, 2023
  • 1 reply
  • 850 views

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.

This topic has been closed for replies.

1 reply

S.Ma
Principal
April 3, 2023

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

MSadf.1
MSadf.1Author
Associate II
April 4, 2023

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