Hi,
Two alternatives:
1. You could assign the input signal to two input events, one that starts/clears the timer on both edges and the other one that captures also on both edges.
In the ISR triggered by the second one you get the pulse length and advance the state machine according to the pulse length.
I did not test if the timer value would be cleared before captured.
2. You could assign the input signal to the event doing the capturing. This one also triggers a service request. In the ISR you clear and restart the timer by software and you update the state machine perfoming the decoding using the measured pulse length.
Regards,
Jesus
Two alternatives:
1. You could assign the input signal to two input events, one that starts/clears the timer on both edges and the other one that captures also on both edges.
In the ISR triggered by the second one you get the pulse length and advance the state machine according to the pulse length.
I did not test if the timer value would be cleared before captured.
2. You could assign the input signal to the event doing the capturing. This one also triggers a service request. In the ISR you clear and restart the timer by software and you update the state machine perfoming the decoding using the measured pulse length.
Regards,
Jesus