1

I was pinging in serial line(UART) using SLIP in PI 2. Ping was reporting certain time. Also, I was using logic analyzer to check the complete duration of packet start to packet end. I found out that the timing is not exactly same. I am wondering what could cause this timing difference?

4
  • What differences are you talking about? If one says minutes and the other seconds I'd be concerned.
    – joan
    Sep 15, 2015 at 14:12
  • Ping reported 8.00 ms and Logic analyzer reported(from first start to last stop bits) 7.65 ms.
    – Main
    Sep 15, 2015 at 14:17
  • I don't find that at all surprising. You are only seeing the electrical part of the transaction on the logic analyser. It has to get through the software layers as well.
    – joan
    Sep 15, 2015 at 14:21
  • Yes. This could be the reason. I was also using logic analyzer with UART serial communication, it reported exact timing what I calculated with Baud. I have not considered the software issues.
    – Main
    Sep 15, 2015 at 14:31

1 Answer 1

1

A normal multitasking OS such as linux, running on a modest processor, has a userspace latency on the order of milliseconds, so being off by 0.35 ms when measuring an event vs. some piece of more dedicated, realtime hardware is to be expected. What would truly be flabbergasting is if they were consistently the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.