I have a periodic input signal, and want to generate a rising edge 90 degrees after that of the input. I thought of using a TMRxA capture input for time reading (period and phase calculated from there), and this works fine.
However I can not find a way to use TMRxB to generate the output rising edge... I can start A and B synchronized, but compare actions only happen on timeout, so I would need to break sync to make it work... Worse, starting compare on an ISR adds an unpredictabledelay.
To put this other way, I want to generate an output signal with a rising edge delayed exactly N clock cycles from that of an input signal.
Any ideas?