Time stamp I2C communication and Latency

Hi, is there a way to timestamp I2C communication and how much latency is there between requesting a read and pulling the value?

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

hello lowellm,

may I know what’s the actual use-case, why don’t you using kernel API to evaluate the latency.

Hi sorry, I have been busy. If there is low latency between when an I2C function is called and when it outputs to the wire that would be ok I think. The issue is how much lag is there?

hello lowellm,

I don’t have numbers, but it’s depends-on how many data you’re going to send via I2C.
why don’t you evaluate the latency by using kernel APIs.

How would I do this?

hello lowellm,

here’s simple sample code snippet.

s64 ts_start = 0, ts_end =0;

ts_start = ktime_to_ms(ktime_get());
ts_end = ktime_to_ms(ktime_get());

pr_info("latency is %lld ms",  (ts_end - ts_start));

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.