I'm currently working with a Kinetis K70 and am wishing to time-stamp certain readings I'm receiving from the ADC.
My issue is that I wish for a microsecond timebase, whilst at the same time I want a counting period of ~ 1 second, meaning that a 16-bit counter is too small.
I have attempted to use the PIT, polling the counter value and converting it to microseconds, however, I'm observing significant inconsistencies in the values returned, resulting in my relative timings sometimes being out by a factor of 10. I'm guessing perhaps the PIT has some unpredictable wait states and can't be used in this manner?
Can anyone suggest a viable alternative?