Frame
Within the FlexRay protocol, the FlexRay frame plays a vital part. Three segments – the header, the payload, and the trailer – add up to the frame.
Since FlexRay is a deterministic system, there is a sequence how these segments are transmitted on the network. As Figure A indicates, the header segment appears first, followed by the payload segment, and then followed by the trailer segment, which is transmitted last.
The FlexRay header segment consists of 5 bytes. These bytes contain the reserved bit, the payload preamble indicator, the null frame indicator, the sync frame indicator, the startup frame indicator, the frame ID, the payload length, the header CRC (cyclic redundancy check code), and the cycle count.
The Header
Protected by an extra CRC code, the header contains protocol control information like the synchronization frame flag, the slot ID, a null frame indicator and the frame length and a cycle counter.
The Payload
The FlexRay payload segment contains 0 to 254 bytes. If this segment does not contain any data, the null frame indicator is set. Optionally the data section can contain a message ID, which identifies the type of information transported in the frame. The bytes of the payload segment are identified numerically, starting at 0 for the first byte after the header segment and increasing by one with each subsequent byte.
The Trailer
Within a single field, the trailer section contains 3 8-bit CRCs (see Figure A) to protect the complete frame and detect errors. The Frame CRC field contains a CRC computed over the header segment and the payload segment of the frame. The computation is done by the hardware and includes all fields in these segments.
