Hello I'm

Sandeep Tiwari

Automotive Software Engineer with more than a decade of experience.

More About Me

How FlexRay Works – Part 1

FlexRay is a Time Division Multiple Access (TDMA) protocol wherein every node in a flexray cluster gets a fixed duration of time on the bus to communicate. A FlexRay cluster is set of nodes (ECU’s) which communicate to each other over a fixed baud rate.

Basic characteristics of the FlexRay protocol are:

Synchronous and asynchronous frame transfer Guaranteed frame latency and jitter during synchronous transfer Prioritization of frames during asynchronous transfer Multi-master clock synchronization Error detection and signaling

Some of the basic terms in FlexRay Protocol are explained below in terms of a top-down approach i.e. from a communication channel to a bit level.

Communication Cycle:

It is an instance on the bus which repeats after a fixed duration. Cycle duration defines the baud rate of the bus i.e. the rate at which the nodes forming a cluster will communicate with each other. E.g. if the cycle time of the bus is defined to be 5 ms then the nodes in the cluster will get a chance to communicate on the bus at every 5 ms over the same frame, if configured.

A communication cycle is subdivided into Static Segment, Dynamic Segment, Symbol Window and NIT (Network Idle Time).

image

FlexRay Cycle with Segments

Static Segment:

It is a portion in the communication cycle wherein the access to the bus is solely determined by time i.e. the time duration of this segment is fixed and the nodes are allotted fixed time to communicate on the bus.

It is a mandatory segment in the communication cycle.

A Static Segment consists of Static Slots,

Static Slots:

It is fixed duration slot which is allotted to a node for communicating on the bus. This duration remains with the node irrespective of whether the data is available for transmission or not. A fixed number of static slots are available per static segment. A FlexRay Frame whose Frame Id matches with the Slot Id is transmitted on the bus.

The duration of a static slot is fixed and is defined in terms of Macroticks.

image

Static Segment

Macroticks:

An interval of time used for cluster wide time synchronization. A macrotick represents the smallest unit of global time i.e. cluster wide time. A macrotick is a multiple of microtick.

Microtick:

A unit of time derived from the Communication Controllers oscillator. It is local to the node. Different nodes may have different microtick duration.

Dynamic Segment:

It is a segment in which the data is transmitted based on the mini-slotting scheme (Flexible Time Division Multiple Access) wherein the time duration allotted to a node is based on the data to be transmitted i.e. if a node has data to be transmitted that is larger than the smallest time slot in the dynamic segment (minislot) then the time duration is increased.

It is an optional segment in the communication cycle.

The Dynamic Segment is made up of Minislots,

image

Dynamic Segment

Minislots:

It is the smallest instance in the dynamic segment allotted to a node for communicating on the bus. If the data to be transmitted by the bus is larger than the duration of the minislot then node can continue its transmission in the next minislot.

Minislots are a multiple of macroticks which are a multiple of microticks.

Symbol Window:

A single symbol is send within a symbol window. Its duration is fixed using a global constant.

It is an optional field in the communication cycle.

The duration of symbol window is defined in terms of macroticks which is a multiple of microticks.

Network Idle Time (NIT):

It is a period during which the node applies the clock correction and helps nodes to re-synchronize to the bus.

It is a mandatory field in the communication cycle.

The duration of NIT is defined in terms of macroticks which is a multiple of microticks.

In part 2 of this article we will take up the details of a FlexRay frame followed by Communication Stack of FlexRay in AUTOSAR.

sandeeptiwari.com | Copyright © All rights reserved | This template is made with by Colorlib