2021-08-11 12:44 AM
Hi
I launched a capture and sensitized the interrupt to both edges.
I want to recognize each edge when intraoperating.
I mean, to find out which edge was intraverted?
I use micro stm32f407vgt
2021-08-11 03:20 AM
There is no indication, which edge was captured.
If you need this, it's better to use two separate channels (CH1+CH2, or CH3+CH4), set them to input from the same physical pin, and set one to capture on rising edge and the other to capture on falling edge.
JW
2021-08-11 05:04 AM
You can read the current value of the pin to make an educated guess at the last edge that triggered it. But otherwise, as JW mentions, there's no way to know.
2021-08-11 05:06 AM
Thanks, but I do not want to involve another IO
2021-08-11 05:36 AM
I can not do by guessing
2021-08-11 05:45 AM
2021-08-11 09:13 AM
You mean another pin? This does not involve another pin - for one channel you select TIMx_CCMRx.CCxS to 0b01 i.e. using "it's own" pin; and for the other 0b10, and in that way you capture signal on the same physical pin.
JW