LIN bus protocol - schedule table


1. Schedule

The scheduling table specifies the transmission order of frames on the bus (scheduling Header) and the transmission time of each frame on the bus.
The scheduling table is located at the host node , and the host tasks are scheduled according to the needs of the application layer. There can be multiple schedules. In general, when it is the turn of a schedule to execute, it will be executed sequentially from the entry specified in the schedule. When it reaches the last frame of the schedule, if no new schedule is started, it will return to the current schedule and execute in the first frame cycle. It is also possible that an interruption occurs during the execution of a schedule, and then return after executing another schedule. For example, the conflict resolution process of an event-triggered frame is a typical example, as shown in the figure below.

When there is only one scheduler, use loop execution

Schedule 1

When three schedulers exist, they are executed sequentially

Schedule 2

Scheduler interrupted

Schedule 3

In addition to specifying the transmission order of the frame ID, the scheduling table also specifies the size of the frame slot ( Frame Slot ).
The frame time slot is the time from the start of the frame header of one frame to the start of the frame header of the next frame specified in the scheduling table.
The frame slots of each frame can be different , and the frame slots must be integer multiples of the time base.

Time Base (Time Base) is the smallest timing unit of the LIN subnet, usually set to 5ms or 10ms.

A frame time slot corresponds to an entry in the scheduling table, as shown in the figure, where i = 1-8.

And starting from the start moment of the time base (called the beat (Tick) of the time base), when switching to another schedule, it must wait until the end of the current frame time slot.

schedule
Among them, TFrame_Maximum is the maximum time for the frame to be transmitted on the bus.
Jitter (Jitter) is the time difference between the falling edge of the synchronization interval segment of the frame and the starting moment of the frame time slot.

2. Summary

The scheduling table is generally determined in the network system design stage and provided by the OEM.

Because the sending sequence of the frames is stipulated, the bus communication sequence has a greater degree of predictability. The existence of the scheduling table makes LIN communication predictable.

Guess you like

Origin blog.csdn.net/qq_41908302/article/details/131263277