CANbedded LINBasic Software for LIN Communication
- Beginning of the page
CANbedded LIN - OEM-Specific Embedded Software Components for LIN
LIN (Local Interconnect Network) is a cost-effective, serial communication system for distributed electronic control units in the motor vehicle. CANbedded LIN Communication is a LIN communication stack and consists of standardized software components. They support the LIN specifications 1.3, 2.0, 2.1/2.2(A) and ISO 17987:2016 as well as SAE J2602 and multi-channel LIN configurations. The components are optimized for code size and execution time to reduce their resource requirements.
- Standard software components based on a portion of the generated code are scalable for application-specific requirements
- Automatic generation of parameter settings and configurations
- Runtime efficiency
- Low demand for ROM and RAM memory
- Simple interfacing to the application software
- Compatibility with other Vector products including analysis, simulation, and calibration tools
- Support of multi-channel LIN configurations
The Local Interconnect Network (LIN) was developed to round out a collection of automotive protocol standards, but it has been adopted in other areas such as automation engineering as well. The focus is on cost-effective communication networks for ECU subsystems with low data rates. LIN therefore perfectly supplements existing bus protocols. Typical application areas are the networking within the door or the seat of a motor vehicle.
LIN networks are described in the LDF (LIN Description File) format according to the “LIN Configuration Language Specification”. This includes all of the information needed to define signals, messages, baud rate and schedule tables. A configuration tool is used to adapt all LIN software components to ECU-specific requirements. The tool imports either LDFs or NCF files (Node Capability File) for parameterization. Modifications and settings in detail:
- Adaptation of ECU-specific parameters to the network design
- Configuration of the LIN driver to the properties of the specific ECU e.g. oscillator frequency, UART, etc.
- Configuration of diagnostic services for LIN Slave ECUs
- Definition of message and signal callbacks
The source codes of the LIN software components are compiled and linked with the application. Vector’s LIN simulation and analysis tools (e.g. CANoe.LIN and CANalyzer.LIN as well as CANoe.Scope) are available for integration, analysis and for test purposes. For physical bus access one of Vector’s XLI-Interface is available; serving as universal serial bus interfaces for the LIN bus. Timing control of the LIN software components is achieved by having tasks called periodically by the application or an operating system. Therefore the LIN driver does not require any auxiliary timers.
The fundamental objective of the implementation is to provide an interface that is easy to use and satisfies all applications. The standardized interface offers these features:
- Initialization of the LIN hardware
- User-configurable baudrate (Recommended: 2400, 9600, and 19200 Baud)
- Sending of LIN messages (confirmation by flags and callback functions)
- Receiving of LIN messages (notification by flags and callback functions)
- Sleep and wakeup handling
- Protocol error handling
- Timeout monitoring of messages
- Checking of runtime behavior during the development phase (debugging)
Two software components are needed for LIN communication. One component is a hardware-dependent low-level SIO driver, whose task is to implement abstraction of access to the serial interface. The second component, the LIN protocol
driver, is overlaid on this and provides an API to higher-level components. This API satisfies all of the requirements of the
current LIN standard.
The driver is a standardized and easy-to-configure software component for communication between master and slave
The LIN driver is a software component for communication between master and slave network nodes which is standardized
and is easy to configure with a configuration tool. It is one of the CANbedded components from Vector; which assures
consistent integration with CAN components. In addition, it may be combined with MICROSAR software.
As a result, this makes it easy to implement CAN-LIN gateways, which are usually realized as master network nodes.
Since the master ECU usually has an auxiliary CAN channel, over which diagnostics are performed from a tester, the main
task of the LIN master is to pass the received tester requests to the relevant LIN slaves. The LIN Diagnostic Transport Layer
(DTL) is used for this; it offers two API types according to the LIN 2.0/2.1 and 2.2 specifications:
- DTL Raw is used if the data already exist in segmented form (routing of CAN TP messages on LIN).
- DTL Cooked accepts assembled diagnostic data and segments them according to LIN bus requirements (Diagnostic Service Data Units).
LINdiag is a very compact implementation of UDS 14229.1 diagnostics for LIN slave ECUs. It receives requests, routes them to the appropriate service and constructs the response in interaction with the application. This involves internal management of a diagnostic buffer to monitor for data consistency and overruns. To send and receive requests and responses LINdiag needs the LIN Transport Protocol, which is included in the delivery.
- Optional for slave ECUs: Diagnostic software components with associated transport protocol
- Optional for master ECUs: Transport protocol with raw or cooked API
- Gateway: CAN-LIN and LIN-LIN routing for master ECUs CANbedded 14
- SAE J2602: As a supplemental option, support of the SAE J2602 “Recommended Practice” specification is available for LIN drivers.
- Flashing of LIN slaves
- Calibration over the XCPonLIN protocol