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.
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.
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).
(Protected) Identifier Field (PID)
The PROTECTED IDENTIFIER FIELD 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.
Frame ID BitsThe 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|
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.
The parity bits are calculated as follows:
- P0 = ID0 ⊕ ID1 ⊕ ID2 ⊕ ID4
- P1 = ! (ID1 ⊕ ID3 ⊕ ID4 ⊕ ID5)
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.
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.
The data response of the slaves is checked by means of a checksum.
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.