I am trying to use the position compare output feature of the EQEP unit to output a pulse that rises at one position compare, and falls at a different position compare. I can see the output pulse, and have configured an interrupt handler for the position compare event -- these work fine. While setting up the second position compare, I configure the output pin as GPIO output. This was more difficult than it should be because the state of the pin is not reflected by the GPADAT register, but it now works.
After setting up the second compare, I have to configure the pin as EQEP again, but *after* the pulse is over. Waiting is awkward: Either I have to busy wait, or I have to schedule a timer interrupt to do the work. Ideally there would be a way to stop the output pulse under software control. Changing the pulse width in QPOSCTL does not do the trick, is there any other solution?
Failing a way to short circuit the pulse, is there any way to determine that it is over?