Frame Timing

A key property of the Local Interconnect Network (LIN) protocol is the use of schedule tables. Schedule tables make it possible to assure that the bus will never be overloaded. They are also the key component to guarantee the periodicity of signals.

The Schedule Table in the LIN Description File (LDF) defines the sequence and time grid in which messages are sent. Once the table has been worked through, the Master begins with the first message again.

In order to develop the schedule table, you need to be able to calculate the duration of LIN messages (i.e. the Frame Slot Width).

Nominal Message Length

The following demonstrates the basic minimum frame slot duration, tFrame_Nom:

lin-message-frame-nom.png

Where:

  • n = #bytes in the response data field (1 to 8)
  • tbit = Baudrate-1
    • ex. (19.2kBit/s)-1 ~ 52.1 µS

LIN message fields are described in detail on this page.

Time Reserve

LIN Slaves are typically implemented using low-cost, lower speed microcontrollers. Thus, the specification allows a time reserve of up to 40% to be added to each SCI frame (UART byte) as shown:

lin-message-frame-max.png

Frame Slot Width

Finally, a small delay tolerance is specified for the Master Node, called tJitter in order to create the final Frame Slot Width:

lin-message-frame-slot-width.png

LIN Schedule

Now that we understand what the Frame Slot Width of a LIN message is, we can begin to understand what a LIN Schedule Table could look like.

The following depicts an example LIN schedule, and corresponding LIN frame slots:

lin-schedule.png

The length of each frame slot varies and depends upon the number of expected data bytes in the response message.

Time Base

LIN Frame Slots are scheduled based on a LIN cluster time unit, called the LIN Time Base, Tbase, which is usually 5 or 10mS.

Tbase and tjitter are both defined in the "Nodes" section of the LIN Description File (LDF) as shown:

lin-schedule-table-tbase.png

Example

The following example depicts a LIN schedule table within an LDF. The table has a "Main" sub-table defining four frame slots. The time base is 5 mS (not shown). The delay parameter specifies the frame slot duration in mS. The value must be a multiple of the Time Base.

lin-schedule-table-example.png
© 2017 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.