Ground Embedded KO Subscribe

Notes / Automotive Software

Vehicle networks: where CAN, LIN and Ethernet belong

The networks used inside a vehicle are divided by speed, cost and real-time needs. The area each one covers and the role of the gateway.

GROUND EMBEDDED · NOTEAutomotive Software 02Vehicle networksCAN_HCAN_LEngineABSBMSClusterGateway
Network Speed Where used
LIN Up to 20 kbps Windows, mirrors, seats, switches
CAN Up to 1 Mbps Most of powertrain, chassis and body
CAN FD 2 to 8 Mbps in the data phase Recent ECUs, diagnostics and updates
FlexRay 10 Mbps, time-division Some premium chassis systems (in decline)
Automotive Ethernet (100/1000BASE-T1) 100 Mbps and up Cameras, ADAS, central computer, zonal backbone
LINwindows, seats · 20 kbpsCANcontrol · 500 kbpsCAN FD2 ~ 5 MbpsEthernetcameras, central computer
Each bus has its place, from slow and cheap to fast and expensive.

Gateway

Powertrain CANGatewayBody CANDiagnostic port (OBD)
A gateway passes only the needed messages between buses.

It joins several networks, passes on only the messages that are needed, and protects the internal networks from the outside (diagnostic port, telematics). It is also the first gate against security attacks.

Communication design documents

Vehicle communication is defined in a DBC file (definitions of CAN messages and signals: ID, period, bit position, scaling) or in ARXML. For example, "12 bits from byte 3 of message 0x123, in units of 0.1 km/h, at a 10 ms period = vehicle speed". The send and receive code is generated from these definitions.

Tools

Tools such as Vector CANoe/CANalyzer, PCAN and BUSMASTER monitor the bus and, with the DBC loaded, show values signal by signal. For a hobby project, a USB-CAN adapter with python-can and cantools does the same job.

3D LABCAN Arbitration SimulationRun what this note explains and watch it respond.Open the lab →FREE PDFGet the 3 free ebooksIf you want to keep reading this topic as one book: BLDC motor control, serial communication and sensors at book length. PDFs are in Korean.Get them free →