> What consumes the other 8000 cycles? Arithmetic? I gave a link to the code (which I haven't read either, so I'm not blaming you), but I expect it's a combination of dealing with the TDC7200 time-to-digital converter chip (it's an SPI peripheral) and arithmetic.
The chip is a combination of a 10 MHz "coarse" counter clocked by an external quartz reference, and a 17 GHz ring oscillator. The latter is subject to drift, so every input measurement is followed by a calibration cycle which measures one cycle of the coarse counter. Then you have to do some math to translate the ring oscillator cycle count to fractions of the 10 MHz timebase. While I expect there's slac in that code which could be taken out, just knowing that there's a 16000 clock cycle budget for *everything* suggests that maybe I shouldn't be cavalier about 4000 cycles. _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev