High-accuracy timing for long periods

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
Post Reply
User avatar
CousinItt
Respected Member
Posts: 360
Joined: Wed May 31, 2017 6:55 pm

High-accuracy timing for long periods

Post by CousinItt »

Hi all,

I need to measure the periods between successive rising (or falling) edges on a single-bit port. I'd like to use input timestamps for maximum accuracy, but the port counters are only 16 bits wide and so can only work for intervals that are too short. Timers are 32-bits wide but, there are delays between the triggering event and the timer being read, leading to more uncertainty than with timestamping. Reducing the clock rate would give an unacceptable loss of precision.

I'm wondering if combining a timer with input timestamping would solve this. The port counter can roll over any number of times between edges, but the edges are precisely timestamped. The timer can provide the nearest multiple of the rollover period and the timestamps can be used fine-tune the result.

Has anyone tried something similar? Is there an alternative approach I've missed?


Post Reply