LIN Message Frame

All data is sent in a Frame Slot which contains a Header, a Response and some Response Space so the Slave will have time to answer. Every frame is sent in a frame slot determined by the LIN Description File (LDF). Messages are created when the Master node broadcasts a frame containing a header. The Slave node(s) then fills the frame with data depending on the header sent from the Master. The data that are exchanged in the frames are referred to as Signals.

frame-slot.png

Master Header

Sync Break Field

The Sync Break is specified as a dominant condition (bus low) at least 13 bit times. This is longer than the worst case data pattern of all dominant, thus ensuring that the bus will see it as a break.

master-header-sync-break.png

Sync Field

The Sync Field byte is sent to enable the Slave to determine the time between two falling edges and thereby determine the transmission rate which the Master uses (auto baud detection). The bit pattern is 0x55 (0b01010101).

master-header-sync-field.png

Protected Identifier Field (PID)

The Protected Identifier Field (PID) consists of two sub-fields; the frame identifier and the parity. Bits 0 to 5 are the frame identifier and bits 6 and 7 are the parity.

master-header-identifier-field.png

Frame ID Bits

The 6-bit frame identifier contains information about sender and receiver and the number of bytes which is expected in the response:
ID Range (Dec) ID Range (Hex) Data Length
0-31 0x00-0x1F 2
32-47 0x20-0x2F 4
48-63 0x30-0x3F 8

Frame IDs are split into 3 categories:

  • 0-50 (0x00-0x3B) are used for normal Signal/data carrying frames.
  • 60 (0x3C) and 61 (0x3D) are used to carry diagnostic and configuration data.
  • 62 (0x3E) and 63 (0x3F) are reserved for future protocol enhancements.

Parity Bits

The parity bits are calculated as follows:

  • P0 = ID0 ⊕ ID1 ⊕ ID2 ⊕ ID4
  • P1 = ! (ID1 ⊕ ID3 ⊕ ID4 ⊕ ID5)

Slave Response

Data Field

Once the header sent by the Master node has been transmitted, it's time for the transfer of actual data to begin. Based on the transmitted identifier, a Slave will recognize that it's been addressed, and reply with a response in the data (signal) field. Several signals can be packed into one frame. Data bytes are transmitted LSB first.

slave-response-data-field.png

A frame carries between one and eight bytes of data. The number of data bytes contained in a frame with a specific frame identifier shall be agreed by the publisher and all subscribers.

Multi-byte numerical quantities are transmitted LSB-first.

Checksum Field

The data response of the Slaves is checked by means of a checksum.

slave-response-checksum-field.png

Use of classic or enhanced checksum is managed by the Master node and it is determined per frame identifier; classic in communication with LIN 1.x Slave nodes and enhanced in communication with LIN 2.x Slave nodes.

Frame identifiers 60 (0x3C) to 61 (0x3D) shall always use classic checksum.

A detailed description of the Checksum calculation (with examples) is provided in Section 2.3.1.5 of the "LIN v2.2A Specification".

© 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.