I would like to use an xmega to measure pulse widths/frequencies. I would need a resolution of about 100 ns, but it doesn't have to be absolute in the sense that if all values are shifted 300 ns, I can deal with that. My question is whether the input capture function of the xmega would be suitable for this. As far as I see, one has to set up the event source, and then the capture interrupt. That seems to be a costly procedure, though, and I wonder whether it is meant to measure with a precision of 100 ns. If this doesn't work, I can set up an external PLL and counter, and drive it from the clock of the xmega, and whenever something happens, just read out the counter value.
I would appreciate any comments on this.