Time Synchronization on System Start

On system start, the time stamping modules begin to time stamp events without waiting for the initial time synchronization.

To manage that situation, CLOCK_NOT_SYNC or CLOCK_FAILURE parameter is set to 1. The same information is available in the time stamp event buffer: ClockNotSynchronized or ClockFailure set to 1 in TimeQuality byte.

Once the time stamping module time is synchronized, CLOCK_NOT_SYNC and CLOCK_FAILURE parameters are set to 0 (or ClockNotSynchronized and ClockFailure set to 0 in TimeQuality byte).

Time Synchronization When the System Is Running

When the system is running, each time stamping module synchronizes periodically its clock with the external clock reference. On synchronization, 3 situations appear:

  • Module internal time is equal to external clock time.

    No change in module internal time.

  • Module internal time is delayed compared to external clock time.

    Module internal time synchronizes with external clock time.

  • Module internal time is ahead of external clock time.

    Module internal time synchronizes with external clock time in the following way:

    • Module internal time is ahead of external clock time while the Device DDT status of BM• CRA 312 10 is:TIME_VALID=1CLOCK_FAILURE=0CLOCK_NOT_SYNC=0.

    • Catch-up mechanism is used to keep time coherence in sequence of events (event n+1 cannot be earlier than event n) and to minimize the time increment recorded in the next timestamp time value:

      Catch-up time = (Internal time - Synchronized time received) x Detection cycle / (Detection cycle - Incrementation step)

    NOTE: “Catch-up time”: the time required to synchronize the time stamp value with the new internal time.

    Synchronization mechanism until module internal time > last time stamp value (internal time cannot be accessed by the user):

    • Every time stamping detection cycle, the time stamp value increments by the maximum of:
      • 1 ms; or

      • Detection cycle time (in a BMX ERT 1604 T module, increment value is 1 ms)

    • The catch-up mechanism activity can be diagnosed in the TimeQuality byte when TimeAccuracy = ClockInSync (0xx11011 bin).

The following figure illustrates the synchronization mechanism when the internal time is ahead of external clock time (5 ms time stamping detection cycle and 1 ms incrementation step):

The following table explains the sequence of events and time values shown in previous picture:

Event

Time Stamp (ms)

Module internal Time (ms)

TimeQuality

Comment

Input 1: 0 -> 1

100

100

TimeAccuracy = 1 ms

 

No Event

N.A.

86 ms

N.A.

External clock synchronization value received

Input 1: 1 -> 0

101

88 ms

TimeAccuracy = ClockInSync

internal Time (n)< Time Stamp (n-1)

=> Time Stamp (n) = Time Stamp (n-1) + 1 ms

Input 1: 0 -> 1

102

93 ms

TimeAccuracy = ClockInSync

internal Time (n)< Time Stamp (n-1)

=> Time Stamp (n) = Time Stamp (n-1) + 1 ms

Input 1: 1 -> 0

103

98 ms

TimeAccuracy = ClockInSync

internal Time (n)< Time Stamp (n-1)

=> Time Stamp (n) = Time Stamp (n-1) + 1 ms

Input 1: 0 -> 1

104

103 ms

TimeAccuracy = ClockInSync

internal Time (n)< Time Stamp (n-1)

=> Time Stamp (n) = Time Stamp (n-1) + 1 ms

Input 1: 1 -> 0

108

108 ms

TimeAccuracy = 1 ms

internal Time (n)> Time Stamp (n-1)

=> Time Stamp (n) = internal Time (n)

N.A. Not Applicable

In this example: Catch up time = (100 - 86) x 5 / (5 - 1). Catch up time = 17.5 ms (around 4 detection cycles of 5 ms).

Time Synchronization Lost When the System is Running

If the time synchronization is lost (no link with the external time reference), the time stamping module time stamps events with its internal time based on the latest successfull synchronization.

NOTE: If the time has never been synchronized, then the internal time is the free running time from epoch.

As in the initial start case, to manage that situation, CLOCK_NOT_SYNC parameter is set to 1 (and ClockNotSynchronized set to 1 in TimeQuality byte).

Once the time stamping module time is synchronized, CLOCK_NOT_SYNC parameter is set to 0 (and ClockNotSynchronized set to 0 in TimeQuality byte).