[etherlab-users] DC question: "Failed to get reference clock time: Input/Output error"?

Jiarui Lian jerry at bertec.com
Mon Jan 16 18:09:13 CET 2017


Thanks Gavin!

I solved the problem by switching to a different repository branch:
* Originally I used branch "stable-1.5".
* Later I changed to branch "default", then the error is gone.

Are there much differences between "stable-1.5" and "default" by now?
Probably it is time to release "stable-1.6" or so?

Jerry


----- Original Message -----
From: "Gavin Lambert" <gavinl at compacsort.com>
To: "Jiarui Lian" <jerry at bertec.com>, "etherlab-users" <etherlab-users at etherlab.org>
Sent: Sunday, January 15, 2017 4:45:16 PM
Subject: RE: DC question: "Failed to get reference clock time: Input/Output error"?

On 14 January 2017 06:02, quoth Jiarui Lian:
> I tried to synchronize master clock to a reference-slave-EK1100 (due to
> Master clock jitter):
> * Based on the example of "examples/rtai_rtdm_dc".
> * I modified the example, since I am using RT-Preempt instead of RTAI.
> * But I got error: "Failed to get reference clock time: Input/Output
error"?
> --- (And I found that the error message comes from function
> "ecrt_master_reference_clock_time()")
> 
> Graeme and Tommaso have some discussions on this issue before, but not
> sure if it is solved:
> http://lists.etherlab.org/pipermail/etherlab-users/2016/003026.html

This error is normal when using the user-mode library -- it takes a few
cycles for the master to locate and init the reference clock and the API
will return EIO or ENXIO during this time.  It should eventually stop doing
that (if a ref clock is indeed found), but in the meantime the user mode
library prints error messages to stderr.

The commit
https://sourceforge.net/p/etherlabmaster/code/ci/3affe9cd0b66fe55ef8e8060778
ef9461a8204a0/ (default branch) removes this logging to avoid the spam.
Alternately you could implement a "spin up time" where you don't try to sync
the master clock for the first few cycles (or until the slaves are all
configured and the network is stable), although this might complicate your
master application.



More information about the Etherlab-users mailing list