cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if Input Capture interrupt routine was called due to Falling or Rising edge, when both are enabled.

IJoe.1
Associate II

Good day to everybody,

In certain STM32 MCUs input capture can be defined for both falling and rising edge.

0693W00000DmC0uQAF.pngIn such cases, how to know if the input capture interrupt routine was called due to a falling or a rising edge? Is there a way to know?

1 REPLY 1

There's no direct way.

But you can simply read the current state of given pin from respective GPIO_IDR, If you know that the input signal won't change too fast.

JW