cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Counter Time Difference on 2 Signals?

Rogers.Gary
Senior II
Posted on January 24, 2016 at 21:51

Objective:

To measure the time difference between 2 different analog signals that have been buffered into a square wave by a Schmitt trigger. Frequencies < 1KHz.

What functions/features of the timer capture system would I need to use in order to achieve this?

Thanks...

#differe #timer #capture #stm32f4
1 REPLY 1
Posted on January 25, 2016 at 00:10

One TIM in maximal mode,  Two Channels in Input Capture. They will timestamp based on the CNT value, you can interrupt on one or both channels. Will depend which you expect to be the early and late signals.

If the two edges are close to each other, and not defined relationship between them, you'd have to watch the latency of the interrupt

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..