About LIN
About LIN
A master node loops through each of the slave nodes, sending a request for
information - and each slave responds with data when polled. The data bytes
contain LIN bus signals (in raw form).
ISO 17987-1:2016: Road vehicles – LIN – Part 1: General information and use
case definition
ISO 17987-2:2016: Road vehicles – LIN – Part 2: Transport protocol and
network layer services
ISO 17987-3:2016: Road vehicles – LIN – Part 3: Protocol specification
ISO 17987-4:2016: Road vehicles – LIN – Part 4: Electrical physical layer (EPL)
specification 12 V/24 V
ISO TR 17987-5:2016: Road vehicles – LIN – Part 5: Application programmers
interface (API)
The Local Interconnect Network (LIN) physical layer is based on ISO 9141 (the K-line bus). It consists of
Physical the bidirectional bus line LIN which is connected to the transceiver of every bus node, and is connected
via a termination resistor and a diode to the positive battery node, VBAT.
The LIN data link layer, often called the LIN protocol, specifies a commander-responder protocol. The LIN
Commander uses one or more pre-programmed scheduling tables to start the sending and receiving to
Data link the LIN frames. These scheduling tables contain at least the relative timing, when the LIN frame sending
is initiated. The LIN frame consists of two parts: header and response. The LIN Commander sends the
header, while either one dedicated LIN Responder or the LIN Commander itself transmits the response.
LIN protocol is a single master / multiple slave model that uses a single wire to transmit data. Only
the Master is able to initiate a LIN communication. LIN Communication Protocol was invented to be
Application used in simple switching applications like car seats, door locks, sun roofs, rain sensors, mirrors and so
on.
In simple terms, the LIN bus message frame consists of a header and a response.
Typically, the LIN master transmits a header to the LIN bus. This triggers a slave,
which sends up to 8 data bytes in response.
This overall LIN frame format can be illustrated as below:
Typically, one slave is polled for information at a time - meaning zero collision risk
(and therefore no need for arbitration). Note that the 6 bits allow for 64 IDs, of
which IDs 60-61 are used for diagnostics (more below) and 62-63 are reserved.
Respone: Data: When a LIN slave is polled by the master, it can respond by transmitting 2, 4 or
8 bytes of data. The data length can be customized, but it is typically linked to the ID range (ID
0-31: 2 bytes, 32-47: 4 bytes, 48-63: 8 bytes). The data bytes contain the actual information
being communicated in the form of LIN signals. The LIN signals are packed within the data
bytes and may be e.g. just 1 bit long or multiple bytes.
Checksum: As in CAN, a checksum field ensures the validity of the LIN frame. The classic 8 bit
checksum is based on summing the data bytes only (LIN 1.3), while the enhanced checksum
algorithm also includes the identifier field (LIN 2.0).
To initiate the LIN bus communication with a slave, the Master sends the header part. If the
Master wants to send data to the Slave, it goes on sending the response part. If the Master
requests data from the Slave, the Slave sends the response part. Direct communication
between slaves is not possible.
Often used on “Sub system”, systems that do not require high transmission speed and
much data. Some systems often use LIN communication network such as: mirror
control, seat control, door lock, sunroof, wiper, glass lift and lower…