How to know if Input Capture interrupt routine was called due to Falling or Rising edge, when both are enabled.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-09-04 8:29 AM
Good day to everybody,
In certain STM32 MCUs input capture can be defined for both falling and rising edge.
In 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?
Labels:
- Labels:
-
GPIO-EXTI
-
Interrupt
-
STM32CubeMX
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-09-04 8:48 AM
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
