Skip to main content
IJoe.1
Associate II
September 4, 2021
Question

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

  • September 4, 2021
  • 1 reply
  • 1038 views

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?

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
September 4, 2021

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