Site Information

 Loading... Please wait...

SAE J1939 Utilizes CAN Bus Message Collision During Bus Arbitration

Posted by Wilfried Voss on

SAE J1939 - Serial Control And Communications Vehicle Network

SAE J1939 is a higher-layer protocol (HLP) based on Controller Area Network (CAN Bus). It provides serial data communications between microprocessor systems (also called Electronic Control Units - ECU) in any heavy-duty vehicles.

Everything that has to do with the CAN Bus provides reliability with the maximum possible performance in mind, not only regarding required electrical robustness but also due to high-speed requirements for a serial communication system.

While the CAN Bus itself is sufficiently suited for communication in a regular automobile or small industrial applications, it comes with a few shortcomings concerning network management. To add these features CAN as the physical layer (the entire CAN Bus protocol is on silicon) can be extended by additional software, i.e., so-called higher-layer protocols (such as SAE J1939).

SAE J1939 takes advantage of CAN Bus features such as:

  • Maximum reliability
  • Excellent error detection & fault confinement
  • Collision-free bus arbitration

Other than the CAN Bus, which supports up to 1 Mbit/sec, SAE J1939 limits itself to 250/500 kbit/sec. CAN was designed to be as close to real-time applications as possible. This level of performance was not required for SAE J1939.

Note: The SAE J1939 Standard is being adjusted to incorporate new technologies such as CAN FD (Flexible Data Rate), allowing higher transmission speeds. Another version, CAN XL is in the making and might have impact on SAE J1939 in the years to come.

Looking deeper into the SAE J1939 bus arbitration, i.e., the address claim process, it becomes clear that the SAE (Society of Automotive Engineers) was not worried about violating the collision-free bus arbitration. They copied a feature from the Ethernet bus arbitration, where it is acceptable to "crash a party." Under Ethernet, when two nodes compete for bus access, they both retreat and retry bus access after a random delay. SAE J1939 uses the same principle.

The Network Management (SAE J1939/81), allows scenarios where two CAN Bus nodes with the same message ID can access the bus. The result of such a situation can be unpredictable.

The scenario, as mentioned, may happen when two ECUs try to claim the same source address at the same time. The following picture demonstrates this possibility:

In this example, both nodes, A and B, are powered up at the same time, their Power-On Self Test (POST) takes the same time, and both nodes send out their Address Claim message at the same time, claiming the same node address. The probability of such a situation taking place may be extremely low, but the consequences can be severe.

The CAN standard does not allow a situation where two nodes use the same message ID. This scenario will create a CAN error frame, and both nodes will attempt to claim the same source address repeatedly until both nodes switch into the Error Passive mode, which in turn will limit their network communication capabilities. Experience has shown that both nodes will eventually return to regular operation, but the time it takes is first of all unpredictable, and proper network function cannot be guaranteed.

SAE J1939/81 recommends an Address Claim Bus Collision Management. The procedure includes checking the occurrence of an error frame and using different delays in both ECUs before they claim their address again. The transmission delay should be calculated by producing a “pseudo-random” delay value between 0 and 255.

SAE J1939/81 explains that, during this process, both nodes would go eventually into BUS OFF mode. However, this statement is not backed up by either the CAN Bus standard (which categorically does not allow two messages with the same message ID) or empirical tests.

Tests (not accomplished by the SAE) have shown that the two competing nodes will go into Error Passive mode, and both nodes will eventually return to the regular Error Active mode. However, the time until both nodes return to regular activities is unpredictable, and so are the consequences for the application.

SAE J1939 Starter Kit And Network Simulator

SAE J1939 Starter Kit And Network Simulator

Our J COM.J1939 Starter Kit And Network Simulator is designed to allow the experienced engineer as well as the beginner to experiment with SAE J1939 data communication without the need of connecting to a real-world J1939 network, i.e. a diesel engine. It may sound obvious, but in order to establish a network, you need at least two nodes, and that fact applies especially to CAN/J1939 where the CAN controller will basically shut down after transmitting data without receiving a response. For that reason, our jCOM.J1939 Starter Kit And Network Simulator consists of two J1939 nodes, namely our jCOM.J1939.USB, an SAE J1939 ECU Simulator Board With USB Port.

The jCOM.J1939.USB gateway board is a high-performance, low-latency vehicle network adapter for SAE J1939 applications. The board supports the full SAE J1939 protocol according to J1939/81 Network Management (Address Claiming) and J1939/21 Transport Protocol (TP).

More Information...