Friends in the automotive-related industry all know CAN bus, which is the bus standard for communication between Electronic control units in today’s automobiles. Now almost all automobile manufacturers choose to use CAN bus communication. The CAN bus was originally born on the basis of the BOSCH company in order to solve many problems such as the contradiction of wiring space caused by the increase of electronic control units in the car and the increase of the weight of the car. At the same time, the CAN bus connects the electronic control units in the car into a local area network, which realizes the sharing of information and greatly reduces the wiring harness of the car.
Compared with the currently popular Ethernet and 485 buses, the CAN bus has the following characteristics: bus access – non-destructive arbitration of carrier sense, multiple access, collision avoidance; multi-host broadcast structure, automatic priority arbitration , strong real-time performance; automatic retransmission of transmission errors, automatic CRC check reception, extremely low data error rate; strong anti-interference ability of differential signal transmission, suitable for the environment with strong interference inside the car; hardware message filtering function, reduce CPU burden.
Based on the above characteristics, the CAN bus can ensure real-time and reliable data transmission, and ensure the normal communication of the vehicle network, and has an irreplaceable position in the new energy vehicle industry.
There are many ECU nodes in the car. When one of the nodes fails and enters the bus off state, it will greatly affect the communication of the vehicle CAN network. For example, when the car collides, the sensor transmits the electrical signal to the airbag ECU, and the signal is processed. When it is determined that the airbag needs to be opened, the ECU will immediately send an ignition signal, and the gas generator will fill the airbag. Passengers are provided with safety protection. If the airbag ECU is in the bus-off state at this time, the airbag cannot be ejected normally, which will lead to serious consequences.
The CAN controller can determine whether the type of error is a temporary data error on the bus (such as external interference, etc.) or a persistent data error (such as internal unit failure, driver failure, wire break, short circuit, etc.). Therefore, when a continuous data error occurs on the bus, the error counter inside the CAN controller accumulates to the bus shutdown threshold, which can isolate the faulty unit from the bus and does not participate in the network communication with other nodes on the bus.
Most of the causes of errors are caused by physical faults, mainly from CAN lines. Including: CAN_H open circuit, CAN_L open circuit, CAN_H to CAN_L short circuit/open circuit, CAN_L to VBAT short circuit, CAN_H to GND short circuit, CAN_L to GND short circuit, terminal resistance open circuit, etc.
In addition to physical layer line factors, it may also be caused by the failure of components such as CAN controllers or transceivers. At the same time, it is also possible that the CAN signal is not sent and received correctly due to the interference of the CAN bus signal. In severe cases, the message cannot be sent normally, which makes the CAN bus more likely to be closed.
For example, new energy vehicles usually refer to pure electric vehicles or hybrid vehicles, which are characterized by the use of batteries and capacitors to store capacity, which are then converted into AC through inverters to drive electric motors to drive vehicles. The huge current generated by the inverter forms strong interference, which crosstalks to the CAN bus, causing the controller to crash, damage or interrupt communication, and the vehicle runs erratically.
If BUS OFF occurs, the nodes on the bus need to take some actions, such as restarting the CAN controller or powering on again, but these are only some remedial measures. The most fundamental thing is to find the root cause of BUS OFF.
When the CAN bus is turned off, we can check the value of the BUS OFF register and initialize the driver of the CAN controller and related registers. After initialization is complete, the CAN bus shutdown fault is immediately removed. In order to prevent the node from frequently shutting down the bus in the CAN network, it is recommended not to send CAN messages immediately after initialization.
As mentioned above, due to strong interference inside the car, the CAN bus will also be turned off. In response to this phenomenon, we deal with it in the following ways: due to the spatial magnetic interference caused by the strong current inside the car, the twisting degree of the CAN cable should be increased; the CAN interface design adopts the CTM1051 isolation transceiver and isolation limiter to prevent the ECU crash; add magnetic ring, common mode Inductor and other effective inductive protection devices to the CAN interface; connect a special signal protector to eliminate interference, such as ZF-12Y2; use the bridge relay device CANBridge to isolate some strong interference sources.
Based on the above, when the car CAN bus is turned off, the external factors such as the physical layer, including CAN lines, CAN controllers and transceivers, and CAN signal interference should be analyzed, and the CAN registers and software processing should be analyzed at the same time. After re-initializing the CAN driver and returning to normal , and periodically try to send outgoing packets. When the new energy vehicle sends the bus off, we also hope to have corresponding CAN messages to analyze, especially for occasional failures, we need reliable CAN messages as the basis for judgment.
Guangzhou Zhiyuan Electronics Co., Ltd. has launched a CAN network bus “black box”, which we call CANDTU. CANDTU integrates 2 or 4 independent CAN-bus channels conforming to the ISO11898 standard, and the standard storage medium is 32G high-speed SD card, which can Various modes such as long-time recording, conditional recording, pre-triggered recording and timing recording can be performed, and the recorded data can be converted into CSV format, or the formats of various mainstream analysis software such as CANOE and CANScope for post-processing analysis.
CANDTU can record CAN messages for a long time to facilitate engineers to find data, but it cannot locate and analyze network stability and sporadic failures.
The Links: CM400HC6-24NFM DMF-50260NFU-FW-23