2015-11-05 11:35 PM
I have the following Problem:
I have two input signals. The frequency of the signals is equal, but there is a delay between this signals. I have to measure the delay between the rising edge of the first input and the rising edge of the second input. I have also to measure the frequency of one Signal. I'm using the STM32F429. Example:2015-11-07 1:03 PM
This is almost the same as measuring pulse width of PWM - see the PWM input sub-chapter of TIM chapter. The only difference is that you don't set capture2's source to channel 1, but each channel captures its own ''native'' input.
JW2015-11-08 2:52 AM
This is one of the most basic examples of input captures possible. Configure a timer of your choice with a certain base time with a precision in range (so at least something as high as the highest possible delay time).
Choose two input channels (most timers have ~4) and configure them for input capture. Activate the interrupt of the channel which triggers the delayed signal and then compare the CCR registers of both channels for the actual delay.We’re moving the ST Community to a new platform to give you a better and more reliable community experience.