Vehicle bus series - FlexRay VI

Vehicle bus series - FlexRay VI

I'm a man in slippers, a long-term car electronics engineer in Shanghai.

Old rules, share a piece of text you like, and avoid becoming an engineer with high knowledge and low culture:

No one follows you. No one needs to follow you either. You have to acknowledge your own worth, you can't stand against yourself by putting yourself in someone else's shoes. In life, the most fearful thing is to take other people's eyes as the only standard of your own life. In the end, I neither lived the way others liked, nor lived the way I wanted.
Only by accepting our true selves, without inferiority or pride, can we have a stronger heart; only by finding our own core values, can we live out our own wonderful life.

Data communication in a FlexRay cluster is periodic and based on a schedule. The communication cycle includes at least two time periods: a static period and a NIT (the network idle time, network idle time) period. The static segment is used to transmit packets deterministically, and the NIT segment is used to synchronize the local clock. No data communication takes place during the NIT segment.

As required, the communication cycle can be extended by adding dynamic segments and symbol windows (Symbol Window). The dynamic segment is used to transmit event-driven messages. In the entire communication cycle, the dynamic segment should be located after the static segment. The symbol window is used to transmit symbols: the collision avoidance symbol is used to indicate the start of the first communication cycle. The media test symbol is used to test the bus monitor, and the wakeup symbol is used to wake up the FlexRay cluster.

Since only the static segment and the NIT segment are necessary in a cycle, there can be four cycle variants. The "Communication Cycle" diagram shows a cycle with all available time segments: static segment, dynamic segment, symbolic window and NIT.

The communication period consists of a specified number of Macroticks, and each time period contains a certain number of Macroticks. Macrotick consists of several Microticks, and Microtick is the smallest time unit of the local clock. Because the difference between crystal oscillator frequencies will produce Microticks of different lengths, in order to obtain synchronized Macroticks, the Macroticks of different FlexRay nodes may be composed of different numbers of Microticks.

During the FlexRay communication cycle, the static segment can provide deterministic data transmission. The TDMA method on which the static segment is based guarantees this.

The static segment consists of several static time slots of equal length. A FlexRay node assigned to a static time slot can send static messages in that time slot. A prerequisite for this process is the synchronization of local counters, each of which is incremented at the beginning of a static slot. The counter value points to a specific static message and FlexRay node.

The "Static Segment" diagram shows the communication schedule for channel A and channel B. The first time slots of the two channels transmit the same message, so that a failure of a single channel will not cause the message to fail to be transmitted. But redundant communication channels can also be used to speed up data transfer rates rather than improve fault tolerance. This is exactly what the other time slots of the static segment do: different telegrams are transmitted in the two channels, and fault tolerance or increased data transmission rates can be selected individually for each FlexRay telegram.

A FlexRay cluster can define up to 1023 static time slots. Since at least two FlexRay nodes are required to generate the global time base (global time base), the static segment must contain at least two static time slots assigned to the two FlexRay nodes respectively.

Sufficiently long static slots are required for smooth transmission of deterministic messages during static segments. The length of the static time slot is firstly determined by the longest FlexRay telegram. A FlexRay message basically consists of frame header, payload, frame trailer and control symbols. In addition, the channel free delimiter which indicates the end of the FlexRay telegram has to be taken into account.

The length of the static slot is also influenced by the maximum allowed signal delay (the maximum allowed delay is 2.5 microseconds), and the maximum allowed time deviation between any two FlexRay nodes after synchronization (exact).

A static slot consists of four parts. Even considering the maximum signal delay and the maximum deviation of the clock of the FlexRay node itself, it can ensure that the telegram is transmitted in a specific static time slot.

The start of each static time slot is an action point offset, and the action point refers to the starting point of message transmission. After the action point offset is the action point and the FlexRay message. The FlexRay message is followed by a channel idle delimiter (11 recessive bits), and finally a pause (channel idle), whose duration is logically equal to the action point offset. Figure "StaticSlot2" details this structure of a static slot.

Clearly, accuracy and signal delay are inversely proportional to the maximum achievable data transfer rate in a FlexRay cluster: as the local clock becomes less accurate or the signal becomes more delayed, the time span between the start of the slot and the action point will become larger and larger, eventually reducing the maximum achievable data transfer rate.

**Dynamic section is optional. Dynamic segments are used to transmit event-driven messages, thus supporting asynchronous processes. To avoid affecting the deterministic data transfer of the static segment, the dynamic segment is always the same length of time and always follows the static segment.

The dynamic segment is based on FTDMA, and the core of the method is still TDMA. Nonetheless, dynamic segments enable flexible communication flows. Therefore, the communication in the dynamic segment is also based on the communication schedule. Dynamic messages defined in the communication schedule are only transmitted in the dynamic segment when an event occurs that requires the transmission of the message.

The counter of each node in the dynamic segment will continue the count of the static segment and continue to increment. The counter value points to a specific dynamic message and FlexRay node. If the FlexRay node has not requested to send a dynamic message matching the counter value, the FlexRay node will increment the counter by one after the length of a minislot. In this case, the dynamic slot is exactly the length of a mini-slot.

If there is a send request, the associated FlexRay node transmits a dynamic telegram matching the counter value. At this time, a dynamic slot may contain multiple mini-slots. After the dynamic slot ends, the counter of the node is incremented by one. After the counter is incremented, if there is a new sending request, the dynamic message matching the current value of the counter is transmitted; otherwise, the counter is incremented after a mini-slot.

This process is repeated until the length of the dynamic segment is not enough to transmit the dynamic message. Since the remaining length of the dynamic segment is too short, no data will be transmitted until the end of the dynamic segment. The dynamic message that has not been transmitted will continue to be transmitted in the dynamic segment of the next cycle. You can get a better understanding of data transfer in dynamic segments with the interactive diagram below the lesson. Please read the instructions so you can take full advantage of its full capabilities.

Obviously, there is a relationship between the counter value assigned to the dynamic message and the probability of transmitting the dynamic message: the larger the counter value, the smaller the probability of transmitting the message. It can be concluded that the smallest counter value assigned to the dynamic segment has the highest priority.

Finally, the system designer must ensure that the dynamic segment can carry the low-priority messages in it, while also ensuring that the longest dynamic messages can be transmitted. **

End of writing and sharing!

May you and I believe in the power of time

Be a long-termist!

Guess you like

Origin blog.csdn.net/Soly_kun/article/details/131882923