Annoying glitch on Timer Output compare channel
For a project I am using a number of timers to generate and/or monitor digital signals in a custom protocol. I stumbled upon a glitch in a timer Output Compare channel which I would like to share to find whether this is recognized and if there is a possible solution.
One of the timers is used in Encoder mode to detect the start and stop of the applicable protocol. Only when one of the signals is high, a rising edge on the other signal identifies the start of a message where a falling edge while the other signal is high identifies the end of a message. When detecting a start, one Output channel 3 is set high (output compare functionality). When detecting a stop the Output Compare channels is set low again. Doing so I generate a signal which is high while a message is present.

The protocol is shown in this picture. The top line is a clock signal and the second line a data signal. As shown, only during the first and the last clock, the data signal changes. During the clocks in between the data signal is constant. The start and stop is detected and results in the third line, the message valid signal.
The glitch is present on the rising edge of the Output Compare channel as shown in the image below (zoomed in, using the logic analyzer at 800MHz)

The glitch occurs ~25ns after the start of the signal and the duration is ~6ns.
Some more info:
- The glitch only occurs when setting the speed of the IO to medium, high or very high. Using speed low the glitch does not occur.
- Enabling pull-up or pull-down on the pin has no effect.
- The glitch is only present in the actual signal. I also use the output compare as a trigger output of another timer and from this I know the glitch is not present in the internal OCREF signal
- I only tested with an STM32H563 and don't know if the glitch is also present in other series.
- Only tested with the timer in encoder mode (which according the documentation) should not have any effect on the OC or PWM behavior of the timer
Hope someone can shed light on this
