[etherlab-dev] DC time offset read datagram not zero

Jeroen Van den Keybus jeroen.vandenkeybus at gmail.com
Wed Nov 6 09:34:15 CET 2013


I found that, at least in stable-1.5, the datagram used to query slaves for
their current time and time offset (0x920, 24 octets) is not zeroed out.
The slave local system time and offset can therefore become corrupt.

This may lead to a wrong 64-bit slave local system time (high order bits)
and causes long PLL lock times since the slave PLL may be required to slew
into an arbitrary 32-bit time offset (up to 2,15 seconds - low order bits).

Patch below.

Rgds,


J.


--- a/master/fsm_master.c       Tue May 21 13:18:24 2013 +0200
+++ b/master/fsm_master.c       Wed Nov 06 09:16:35 2013 +0100
@@ -976,6 +976,7 @@
             //     and time offset (0x0920, 64 bit)
             ec_datagram_fprd(fsm->datagram, fsm->slave->station_address,
                     0x0910, 24);
+                       ec_datagram_zero(fsm->datagram);
             fsm->datagram->device_index = fsm->slave->device_index;
             fsm->retries = EC_FSM_RETRIES;
             fsm->state = ec_fsm_master_state_dc_read_offset;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20131106/79c67202/attachment.html>


More information about the etherlab-dev mailing list