191
ATmega16M1/32M1/64M1 [DATASHEET]
8209E–AVR–11/2012
Figure 20-1. LIN cluster with one master node and “n” slave nodes.
The master task decides when and which frame shall be transferred on the bus. The slave tasks provide the data
transported by each frame. Both the master task and the slave task are parts of the Frame handler.
20.3.2
Frames
A frame consists of a header (provided by the master task) and a response (provided by a slave task).
The header consists of a BREAK and SYNC pattern followed by a PROTECTED IDENTIFIER. The identifier
uniquely defines the purpose of the frame. The slave task appointed for providing the response associated with the
identifier transmits it. The response consists of a DATA field and a CHECKSUM field.
Figure 20-2. Master and slave tasks behavior in LIN frame.
The slave tasks waiting for the data associated with the identifier receives the response and uses the data trans-
ported after verifying the checksum.
Figure 20-3. Structure of a LIN frame.
20.3.3
Data transport
Two types of data may be transported in a frame; signals or diagnostic messages.
Signals
Signals are scalar values or byte arrays that are packed into the data field of a frame. A signal is always present
at the same position in the data field for all frames with the same identifier.
Diagnostic messages
Diagnostic messages are transported in frames with two reserved identifiers. The interpretation of the data field
depends on the data field itself as well as the state of the communicating nodes.
master task
slave task
master node
slave task
slave node
1
slave task
slave node
n
LIN bus
Master task
Slave task 1
Slave task 2
HEADER
RESPONSE
HEADER
RESPONSE
BREAK
Field
SYNC
Field
CHECKSUM
Field
DATA-0
Field
IDENTIFIER
PROTECTED
DATA-n
Field
Break delimiter
Response space
Inter-byte space
Inter-frame space
RESPONSE
HEADER
FRAME SLOT
Each byte field is transmitted as a serial byte, LSB first.