There are several different frame types in Local Interconnect Network (LIN), each contributing specific functionality to the data link layer.
This is the “normal” type of LIN communication. The master sends a frame header in a scheduled frame slot and the designated slave node fills the frame with data. Unconditional frames carry signals and their frame identifiers are in the range 0 (zero) to 59 (0x3B).
Event Triggered Frames
The purpose of an event triggered frame is to increase the responsivity of the LIN cluster without assigning too much of the bus bandwidth to the polling of multiple slave nodes with seldom occurring events.
- Master asks slaves if a certain event has occurred
- Only those who have seen the event publish a response
- Identifiers 0x00 to 0x3b (0-59)
- Collisions are possible - If more than one slave has detected the specified event, all respond simultaneously resulting in a collision
- When detected, MASTER reverts to unconditional frames
- Can result in better utilization of bandwidth
No slaves have event to report, no one publishes:
SLAVE1 has an event to report and publishes a response:
Two (or more) slaves detect and publish responses:
The purpose of sporadic frames is to blend some dynamic behavior into the deterministic and real-time focused schedule table without losing the determinism in the rest of the schedule table.
- Sent by MASTER only when it is known that a slave has updated information to publish
- Blends dynamic behavior into schedule table
These are used in the Transport Layer Specification section of the LIN v2.2A Specification. Their primary function is in the area implementing diagnostics and configuration functions on LIN slaves.
- Carry diagnostic/configuration data
- Always contain 8-byte data payload
- Designated Identifiers
- 0x3C (60) Master Request Frame
- 0x3D (61) Slave Response Frame
Data Field Definitions
- Node Configuration
- Configuration of standard slaves
- Universal usage
- Off the shelf sensors can be used
- NAD (Node Address)
- Initial NAD: Origin address of slave (Slave answers to this address in case of a Master Request)
- NAD: address of slave. Can be assigned by configuration.
- Supplier ID
- Supplier Identification e.g. 0x0014 = Microchip
- Function ID
- Function Application e.g. 0xAA55 = Window Lift Switch
- Application Type e.g. 0x3C = Anti Pinch Function
Example (Master Request Frame)
Example (Slave Response Frame)
Network Management Frames
Network management in a LIN cluster refers to cluster wake up and go to sleep only.
All Nodes Sleep Command
The master sets the cluster into bus sleep mode by transmitting a go to sleep command. The go to sleep command is a master request frame with the first data field set to 0
and rest set to 0xFF:
- Any node can request a wakeup
- Node forces dominant from 250 µs – 5 ms
- All nodes should then wakeup within 100 ms from end of wakeup signal
- Master node must transmit within 150 ms