CAN operation
A1 - Dashboard; CAN B - CAN data bus. Salon; CAN C - CAN data bus. Engine and running gear; N2 / 7 - Control unit for self-diagnosis systems; N3/10 - Engine control unit; N10/6 - Left front SAM; N10/7 - Right front SAM; N10/8 - Rear SAM; N15/3 - ETC control unit; N15/5 - AT selector lever control unit; N22 - KLA button control unit; N47-5 - ESP, SPS and BAS control unit; N73 - EIS control unit; N80 - Steering column block; N93 - Central entrance control unit; X11/4 - Diagnostic socket
CAN communication
B - Sensor 1; CAN - Data bus; M - Executive elements I - III (servo mechanisms); N - Control units (controllers) I - V
Data network elements (CAN)
CAN B (Salon)
K1 - Front registration and control unit with fuse and relay box (SAM/SRB-V); K2 - Rear registration and control unit with fuse and relay box (SAM/SRB-H); K3 - Left seat control unit (SSG); K4 - Right seat control unit (SSG); K5 - Front left door control unit (TSG); K6 - Front right door control unit (TSG); K7 - Rear left door control unit (TSG); K8 - Rear right door control unit (TSG); K9 - Roof control unit (DBE); K10 - Upper control field (OBF); K11 - Lower control field (UBF); K12 - Electronic ignition start switch (EZS); K13 - Dashboard (KI); K14 - System COMMAND / audio 10 / audio 30 / audio 30 APS; K15 - Parktronic system (PTS); K16 - Trailer coupling device (AAG); K17 - Multifunctional control unit for special models (MSS); K18 - Parking heating; K19 - Heater (KKLA/BKLA – SA); K20 - Distributor CAN-B RBA right; K21 - Distributor CAN-B RBA left; K22 - Distributor CAN-B console; K23 - Airbags with built-in ARMINCA call system
CAN C (Drive and running gear)
K12 - Ignition switch (EZS); K13 - Dashboard (KI); K24 - Electronic gearbox control (EGS or KGS); K25 - Engine control unit (MSG); K26 - Electronic gear selector unit (EMW); K27 - Distributor CAN Class-C RBA left; K28 - Electronic anti-skid system (ESP)
Non-networked SGs
K29 - Automatic range control (ALWR)
K30 - TV tuner
Elements connected to the fiber optic D2B bus
D2B — (Audio/Communication/Navigation)
Fiber optic cable
K14 - COMMAND / audio 10 / audio 30 / audio 30 APS; K31 - Telephone system (MINNA emergency call); K32 - Linguatronic voice control device (SBS); K33 - Mobile phone controller (interface); K34 - Sound amplifier; K35 - CD changer
Not all shown
A2 - Radio receiver or radio tape recorder; A2/6 - CD changer; A40/3 - Display and control unit for the functioning of the COMAND system; A2/13 - Sound amplifier; A35/11 - Voice control system control unit; A59/1 - D2B interface for mobile/built-in telephone; A35 - Cell phone transceiver (CTEL) / TELE AID emergency call systems; A35/8 - TELE AID control unit; A, B, C - Connections; M1 - Fiber optic cable 1; M2 - Optical fiber cable 2; M3 - Fiber optic cable 3; M4 - Fiber optic cable 4; M5 - Fiber optic cable 5; M6 - Fiber optic cable 6; M7 - Fiber optic cable 7; ws - white insert
OC
Od
Basic information
The vehicle uses several CAN busses (Controller Area Network) between blocks (modules) control of various systems and controllers of executive devices of the car.
Individual control units are networked with each other and can exchange data.
The bus is bidirectional, i.e. any device connected to it can receive and transmit messages.
Sensor signal (sensor) enters the nearest control unit, which processes it and transfers it to the CAN data bus.
Any control unit connected to the CAN data bus can read this signal, calculate the value of the control action based on it, and control the servo actuator.
Advantages
With the usual cable connection of electrical and electronic devices, each control unit is directly connected to all sensors and actuators from which it receives measurements or which it controls.
The complication of the control system leads to excessive length or multiple cable lines.
Compared to standard cabling, the data bus provides:
- Reducing the number of cables. The wires from the sensors are pulled only to the nearest control unit, which converts the measured values into a data packet and transfers it to the CAN bus.
- Any control unit can control the actuator, which receives the corresponding data packet via the CAN bus, and on its basis calculates the value of the control action on the servomechanism.
- Improved electromagnetic compatibility.
- Reducing the number of plug connections and reducing the number of contact outputs on control units.
- Weight loss.
- Reducing the number of sensors, because single sensor signals (e.g. from the coolant temperature sensor) can be used by different systems.
- Improving diagnostic capabilities. Because single sensor signals (e.g. speed signal) are used by different systems, then if a fault message is issued by all systems using this signal, the sensor or control unit that processes its signals is usually faulty. If the error message comes from only one system, although this signal is also used by other systems, then the cause of the malfunction is most often in the processing control unit or servomechanism.
- High data rate - up to 1 Mbit/s possible with a maximum line length of 40 m. Mercedes-Benz vehicles currently have data transfer rates between 83 Kbit/s and 500 Kbit/s.
- Several messages can be transmitted in turn on the same line.
The CAN data bus consists of a two-wire wire made in the form of a twisted pair. All devices connected to this line (device control units).
Data transfer is carried out with duplication on both wires, and the logical levels of the data bus are mirrored (that is, if a logic zero level is transmitted on one wire (0), then the level of a logical unit is transmitted on another wire (1), and vice versa).
The two-wire transmission scheme is used for two reasons: to detect errors and as a basis for reliability.
If the voltage peak occurs on only one wire (e.g. due to EMC problems (electromagnetic compatibility)), the receiver units can identify this as an error and ignore this voltage spike.
If there is a short circuit or a break in one of the two wires of the CAN data bus, then thanks to the integrated hardware and software system of reliability, there will be a switch to the single-wire operation mode. A damaged transmission line will not be used.
Order and format transmitted and received by users (subscribers) messages is defined in the communication protocol.
A significant distinguishing feature of the CAN data bus compared to other bus systems based on the principle of subscriber addressing is message-related addressing.
This means that each message on the CAN data bus is assigned its permanent address (identifier), marking the content of this message (e.g.: coolant temperature). The CAN data bus protocol allows the transmission of up to 2048 different messages, with addresses from 2033 to 2048 being permanently fixed.
The amount of data in one message on the CAN data bus is 8 bytes.
The receiver block processes only those messages (data packets), which are stored in its list of CAN·messages received on the data bus (acceptance control).
Data packets can only be transmitted if the CAN data bus is free (i.e. if after the last data packet an interval of 3 bits followed and no control unit starts to send a message).
In this case, the logical level of the data bus must be recessive (logical «1»).
If several control units start transmitting messages at the same time, then the priority principle takes effect, according to which the message on the CAN data bus with the highest priority will be transmitted first without losing time or bits (arbitration of access requests to the common data bus).
Each control unit that loses the right to arbitrate will automatically switch to receive and retry to send its message as soon as the CAN data bus is free again.
In addition to data packets, there is also a request packet for a specific message on the CAN data bus.
In this case, the control unit, which can provide the requested data packet, responds to this request.
Data Packet Format
In normal transmission mode, data packets have the following block configurations (frames):
Data Frame (message frame) for transmitting messages on the CAN data bus (e.g.: coolant temperature).
Remote Frame (request frame) to request messages on the CAN data bus from another control unit.
Error Frame (error frame) all connected control units are notified that an error has occurred and the last message on the CAN data bus is invalid.
The CAN data bus protocol supports two different CAN data bus message frame formats that differ only in the length of the identifier:
- standard format;
- extended format.
DaimlerChrysler currently only uses the standard format.
The data packet for transmitting messages on the CAN data bus consists of seven consecutive fields (refer to illustration 9.0c):
- Start of Frame (start bit): Marks the beginning of the message and synchronizes all modules.
- Arbitration Field (id and request): This field consists of an identifier (addresses) 11 bits and 1 check bit (Remote Transmission Request-Bit). This control bit marks the packet as a Data Frame (message frame) or as Remote Frame (request frame) no data bytes.
- Control Field (control bits): Control field (6 bit) contains IDE bit (Identifier Extension Bit) to recognize the standard and extended format, a spare bit for subsequent extensions and - in the last 4 bits - the number of data bytes embedded in the Data Field (data field).
- Data Field (data): Data field can contain 0 to 8 bytes of data. A message on the CAN data bus with a length of 0 bytes is used to synchronize distributed processes.
- CRC Field (control field): CRC field (Cyclic-Redundancy-Check Field) contains 16 bits and serves for control recognition of errors during transmission.
- ACK Field (acceptance confirmation): ACK field (Acknowledgement Field) contains an acknowledgment signal for all receiver units that received a message via the CAN bus without errors.
- End of Frame (end of frame): Marks the end of the data packet.
- Intermission (interval): Interval between two data packets. The interval must be at least 3 bits. After that, any control unit can transmit the next data packet.
- IDLE (rest mode): If no control unit sends messages, then the CAN bus remains in idle mode until the next data packet is transmitted.
Priorities
In order to process data in real time, it must be possible to transfer them quickly.
This not only requires a link with a high physical data rate, but also requires that a common CAN bus be quickly provided if several control units need to send messages at the same time.
In order to distinguish between the messages transmitted on the CAN data bus according to the degree of urgency, different priorities are provided for individual messages.
Ignition timing, for example, has the highest priority, slip values have medium, and the outside temperature has the lowest priority.
The priority with which a message is transmitted on the CAN bus is determined by the identifier (address) the corresponding message.
An identifier corresponding to a smaller binary number has a higher priority, and vice versa.
The CAN data bus protocol is based on two logical states: The bits are either «recessive» (logical «1»), or «dominant» (logical «0»). If a dominant bit is transmitted by at least one module, then recessive bits transmitted by other modules are overwritten.
Example
If several control units start data transfer at the same time, then the conflict of access to the common data bus is resolved by «bitwise arbitration of shared resource requests» with the appropriate identifiers.
When transmitting the identifier field, the transmitter checks after each bit whether it still has the right to transmit, or whether another control unit is already transmitting a message with a higher priority on the CAN data bus.
If the recessive bit transmitted by the first transmitter unit is overwritten by the dominant bit of another transmitter unit, then the first transmitter unit loses its right to transmit (arbitration) and becomes a receiver block.
First control unit (N I) loses arbitration from the 3rd bit.
Third control unit (N III) loses arbitration from the 7th bit.
Second control unit (N II) retains the right to access the CAN data bus and can transmit its message.
Other control units will only attempt to transmit their messages on the CAN data bus when it is free again. In this case, the right to transmit will again be granted in accordance with the priority of the message on the CAN data bus.
Error recognition
Interference can lead to errors in data transmission. Such transmission errors should be recognized and corrected. The CAN data bus protocol distinguishes between two levels of error recognition:
- mechanisms at the Data Frame level (message frame);
- bit-level mechanisms.
Mechanisms at the Data Frame level
Cyclic-Redundancy-Check
Based on the message transmitted via the CAN data bus, the transmitter calculates the control bits that are transmitted together with the data packet in the field «CRC Field» (checksums). The receiver unit recalculates these control bits on the basis of the message received via the CAN data bus and compares them with the control bits received with this message.
Frame Check
This mechanism checks the structure of the transmitted block (frame), that is, bit fields with a given fixed format and the frame length are rechecked.
Errors detected by Frame Check are marked as format errors.
Bit level mechanisms
Monitoring
Each module, when transmitting a message, monitors the logical level of the CAN data bus and determines the differences between the transmitted and received bits. This ensures reliable recognition of global and local bit errors that occur in the transmitter unit.
Bit Stuffing
In each data packet between the field «Start of Frame» and the end of the field «CRC Field» there should be no more than 5 consecutive bits with the same polarity.
After each sequence of 5 identical bits, the block transmitter adds one bit with opposite polarity to the bit stream.
Receiver units clear these bits after receiving a message on the CAN data bus.
Troubleshooting
If any CAN data bus module detects an error, it will abort the current data transfer process by sending an error message. The error message consists of 6 dominant bits.
Thanks to the error message, all control units connected to the CAN data bus are notified of a local error that has occurred and accordingly ignore the previously transmitted message.
After a short pause, all control units will again be able to send messages on the CAN data bus, with the message with the highest priority being sent first again.
The control unit whose message on the CAN data bus caused the error also starts retransmitting its message (automatic repeat request function).
CAN bus types
Different CAN buses are used for different control areas. They differ from each other in data transfer speed.
CAN baud rate area «engine and running gear» (CAN-C) is 125 Kbps, and the CAN data bus «Salon» (CAN-B) due to the smaller number of especially urgent messages, it is designed for a data transfer rate of only 83 Kbps.
The exchange of data between the two bus systems takes place via so-called «gateways», i.e. control units connected to both data buses.
The CAN data bus interface is located in the electronic ignition lock control unit (N73). This control unit also provides an interface between the CAN data bus control units and the DLC (X11/4).
When replacing, the new control unit must be coded using a diagnostic tool.
All CAN data bus control units use the standard «OSEK».
Fiber optic D2B (Digital Daten-Bus) data applied to area «Audio/Communication/Navigation». An optical fiber cable can transmit a significantly larger amount of information than a bus with a copper cable.
CAN C bus «Engine and Chassis»
A so-called data bus terminating resistor with a resistance of 120 Ω is installed on each side of the terminal control unit, connected between both wires of the data bus.
The engine compartment CAN data bus is only active when the ignition is on.
7 control units are connected to the CAN-C bus.
CAN B - bus «Salon»
Some control units connected to the passenger compartment CAN data bus are activated regardless of the ignition being switched on (e.g. single lock system).
Therefore, the passenger compartment CAN data bus must be operational even when the ignition is switched off, which means that the possibility of transmitting data packets must be ensured even when the ignition is switched off.
In order to reduce the quiescent current consumption as much as possible, the CAN data bus, in the absence of data packets necessary for transmission, switches to passive standby mode, and is activated again only the next time it is accessed.
If in the passive standby mode of the passenger compartment CAN data bus, any control unit (e.g. single lock control unit) transmits a message on the CAN data bus, it is received only by the main system module (electronic ignition switch, EZS). The EZS block stores this message in memory and sends an activation signal (Wake-up) to all control units connected to the passenger compartment CAN data bus.
When activated, the EZS checks for all CAN databus users and then transmits the previously stored message.
20 control units are connected to the CAN-B bus.