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.2 kBit/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 Serial Communications Interface (SCI) frame (Universal Asynchronous Receiver Transmitter (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 the frame slot width of a LIN message, we can begin to understand the LIN schedule table.

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 10 mS.

Tbase and tjitter are both defined in the "Nodes" section of the 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
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.