I’m having some timing issues with timestamps which are being assigned to my incoming data packets read through serial. The data is coming in at 600Hz. And I am time stamping the data via the ClockCycles command ( ideally each time stamp is 1.67 ms apart – This is what I am graphing on Matlab ) . In the past I used to use the clock_gettime( CLOCK_REALTIME, &t1) command but was not able to get the resolution that I needed i.e my timestamps were 2+ ms apart .
The problem I am getting is that periodically I get spikes or jitter in the timestamp (the interval increases between to 5-10 ms).
I’m still relatively new to this could someone please explain to me this phenomena ?
I have read the tick tock articles on the QNX website … Is this Jitter/Spike something which I cannot get rid of ?