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?
Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
1 post • Page 1 of 1
- XCore Addict
- Posts: 174
- Joined: Wed May 31, 2017 6:55 pm
Who is online
Users browsing this forum: No registered users and 1 guest