Module Operation
www.ti.com
1228
SPNU563A–March 2018
Submit Documentation Feedback
Copyright © 2018, Texas Instruments Incorporated
FlexRay Module
26.2.4 Clock Synchronization
In TT-D mode a distributed clock synchronization is used. Each node individually synchronizes itself to the
cluster by observing the timing of received sync frames from other nodes.
26.2.4.1 Global Time
Activities in a FlexRay node, including communication, are based on the concept of a global time, even
though each individual node maintains its own view of it. It is the clock synchronization mechanism that
differentiates the FlexRay cluster from other node collections with independent clock mechanisms. The
global time is a vector of two values; the cycle (cycle counter) and the cycle time (macrotick counter).
Cluster specific:
• Macrotick (MT) = basic unit of time measurement in a FlexRay network, a macrotick consists of an
integer number of microticks (μT)
• Cycle length = duration of a communication cycle in units of macroticks (MT)
26.2.4.2 Local Time
Internally, nodes time their behavior with microtick resolution. Microticks are time units derived from the
oscillator clock tick of the specific node. Therefore microticks are controller-specific units. They may have
different duration in different controllers. The precision of a nodes local time difference measurements is a
microtick (μT).
Node specific:
• Sample clock -> prescaler -> microtick (µT); typically 25ns.
• μT = basic unit of time measurement in a communication controller, clock correction is done in units of
μTs
• Cycle counter + macrotick counter = nodes local view of the global time
26.2.4.3 Synchronization Process
Clock synchronization is performed by means of sync frames. Only preconfigured nodes (sync nodes) are
allowed to send sync frames. In a two-channel cluster, a sync node has to send its sync frame on both
channels.
For synchronization in FlexRay the following constraints have to be considered:
• Max. one sync frame per node in one communication cycle
• Max. 15 sync frames per cluster in one communication cycle
• Every node has to use a preconfigured number of sync frames (GTUC2.SNM(3-0)) for clock
synchronization
• Minimum of two sync nodes required for clock synchronization and startup
For clock synchronization the time difference between expected and observed arrival time of sync frames
received during the static segment is measured. In a two channel cluster the sync node has to be
configured to send sync frames on both channels. The calculation of correction terms is done during NIT
(offset: every cycle, rate: odd cycle) by using a FTA / FTM algorithm. For details see FlexRay protocol
specification v2.1 Rev. A.
26.2.4.3.1 Offset (Phase) Correction
• Only deviation values measured and stored in the current cycle used
• For a two channel node the smaller value will be taken
• Calculation during NIT of every communication cycle
• Offset correction value calculated in even cycles used for error checking only
• Checked against limit values
• Correction value is a signed integer number of μTs