Topics:
Introduction:
Flexray is an automotive communication protocol that has been developed for vehicles with systems that need to communicate with each other very quickly and reliably. Examples include systems for complex safety functions such as drive-by-wire, steer-by-wire and brake-by-wire. For these types of applications, the CAN bus may fall short, especially in terms of speed and predictability. Flexray has therefore been designed as a supplement to CAN and is established as an international ISO standard (ISO 17458). FlexRay is:
- Very fast. Data can be transmitted at speeds of up to 10 Mbit/s per channel, which is significantly faster than the CAN bus;
- Deterministic and time-triggered: communication follows a fixed schedule in which each control unit has a fixed position in time. This makes the behaviour of the network predictable and reproducible;
- Fault-tolerant: possible failures in cables or modules can still allow the network to keep communicating (if necessary via the redundant channel).
This page explains the characteristics and advantages of Flexray compared with CAN.
Topology:
Flexray supports multiple network structures, also known as topologies. The most commonly used topology is the bus structure, which in principle is comparable to the CAN bus. Multiple control units are connected to a single shared differential signal line. This setup requires relatively few wires and connectors, which keeps the wiring clear and the costs limited. A disadvantage of the bus structure is that an interruption in the bus, for example due to a broken wire or a poor connection, can affect multiple control units at the same time.
In addition, Flexray supports a star topology. In this configuration, control units are connected via separate links to a central node, for example an active star coupler. An important advantage of this is that a fault in one branch of the network does not directly affect the rest of the system. This increases the fault tolerance and reliability of the network.
Hybrid topologies are also possible. In these, bus and star structures are combined. This setup combines the simple wiring of a bus structure with the increased reliability of a star topology. In vehicles with many control units and high safety requirements, this combination is often used.
Flexray can operate with one or two communication channels, called “single channel” and “dual channel”.
- In a single-channel configuration, one channel is used for communication. This is simpler and cheaper, but does not offer redundancy;
- In a dual-channel configuration there are two options. Both channels can transmit the same information. If one channel fails, the other channel can continue to handle communication (redundancy). The second option is that both channels transmit different data. This increases the available bandwidth.
A dual-channel configuration in combination with a star or hybrid topology results in a highly reliable network. This is one of the reasons why Flexray is used in vehicle safety systems.
Speed:
Flexray is designed for high data rates and supports communication up to 10 Mbit/s per channel. This is significantly faster than CAN high-speed networks. Because Flexray can operate with two channels, the total data capacity can be further increased when both channels transmit different data.
The fixed time structure contributes to the high data rate. Because no arbitration takes place, no time is lost waiting for bus access. The explanation of the fixed time structure is given in the next paragraph.
Communication according to a fixed time cycle:
The Flexray network is deterministically structured. Deterministic means that it is predetermined when each control unit may transmit and when it receives messages. Communication takes place in repeating cycles that are exactly synchronized for all control units in the network. As a result, each control unit knows precisely at what moment certain information may be transmitted and when the information will be received.
Each communication cycle is divided into a static and a dynamic segment:
- The static segment is fully time-triggered. In this part of the cycle, each control unit is assigned one or more fixed time slots. Only in these assigned time slots may the relevant control unit transmit a message. Because these time slots recur at exactly the same position in every cycle, the data transfer is completely predictable for all control units in the network. Since no arbitration is applied as with the CAN bus, there is no risk that a control unit has to wait with its message because the message has a low priority;
- The dynamic segment is a supplement to the static segment: communication here is event-triggered. Control units can transmit messages here when needed, as long as space is available within the dynamic segment. This segment is intended for less critical information, such as status information from sensors that have little influence on the safety system, or comfort functions where delays have no noticeable impact on safety.