Event triggered one shot on XmegaA4U
I am not sure that I can configure the timer to operate as a one-shot that can elicit a change on an output pin. Does anyone know if this is possible?


It is possible to generate a true fixed-length one-shot on AVR8 Timer hardware, but it is not straight forward. 

The basic idea is to set the match value higher than the top value. If you then set the count to a value higher than the top, it will count up and hig the match exactly once before overflowing back to zero and then getting trapped down below match.

Using this technique it is actually possible to trigger a one-shot pulse as short as a single cycle. Additionaly, once started these one-shots will run deterministically to completion without any intervention whatsoever from the processor. 



A full explanation and working code available here...

https://wp.josh.com/2015/03/12/avr-timer-based-one-shot-explained/