CAN Conformance: The Ultimate Testing Method for CAN and CAN FD Protocol Software

Vaibhav Anand
Embitel Technologies
3 min readNov 17, 2021

Standardization is at the core of the automotive ecosystem. Whether it is in vehicle networks, software development, functional safety or cybersecurity, a common thread of standardization can be observed.

Among a plethora of benefits that standardization brings to the table, interoperability is considered to be one of the most important. Interoperability takes center stage especially in the case of vehicle network protocols such as CAN and CAN FD.

Different OEMs implement CAN or CAN FD in different ways, resulting in instances of with systems from different vendors. If there is any error while operating a multi-vendor system, it becomes difficult to find the root cause of that error. The root of such issues lies within the data link layer and the physical layer of CAN or CAN FD. One of the most reliable ways of ensuring interoperability between different implementations of CAN protocol is the execution of CAN conformance test.

What is Conformance Test?

Implementation of a CAN based vehicle network must be in accordance with ISO 11898–1 specification. In order to have substantial confidence that the standard specifications have been correctly interpreted and implemented by the developers, conformance test is required.

As the name suggests, this test ensures that there is a conformance to the standard. ISO 16845–2:2018 specifies the CAN conformance test plan for road vehicles. For any automotive solution to be ISO-11898 conformant, it must show the evidence that it has followed all the testing procedures entailed in the ISO 16845 standard.

Let’s now briefly understand how conformance test is performed:

  • Conformance test begins with tagging. This is the process of identifying and tagging each testable item so that they are not missed during the test design. The tagging is performed on the basis of state information of each item, their specific requirements, behavior, and other information.
  • Once the tagging is completed, the test cases are designed so as to cover each of the tags identified. In addition, their functional behavior is also verified.
  • CAN Implementation Under Test (IUT) must be tested according to the test plan shown in the image below. IUT is tested by two testers namely, Lower Tester (LT) and Upper Tester (UT). The upper tester is essentially a programmable device that serves as a platform to conduct the test between the IUT and the lower tester (LT). LT sends the details of the test being performed to the UT, which in turn, generates messages and passes them on to the IUT. UT and LT components monitor whether IUT is able to process the messages correctly and if it does, the test is considered as passed, and vice versa.

Tools and Platforms for CAN Conformance Testing

Thanks to some test automation tools, the CAN conformance testing has become relatively easier and less time consuming.

1. CANoe is one of the most widely used development and testing tool for building CAN based software. During the development of an automotive control unit, CANoe, among other processes, is used to perform CAN conformance test. There are CANoe test packages that can create test configurations and execute the tests automatically, thus saving a lot of time and effort.

2. CAPL (CAN Access Programming Language) is a companion of CANoe and works together to create robust simulations to perform CAN conformance test more efficiently. CAN conformance is all about creating test cases based on the ISO 16845–2:2018 standard. These test cases need to be implemented and this is where CAPL is required. With CAPL, one can create test cases easily and execute them multiple times if required.

Conclusion

Standardization does not limit the interpretation of its specifications. Hence, even if two components are based on the same standard, they may appear similar but need not necessarily exhibit the same behavior.

Conformance testing eliminates this difference between components of different suppliers and brings in the much-needed interoperability. Conformance test is not restricted to CAN and CAN FD. Several such vehicle network protocols like FlexRay and LIN require conformance testing before they are implemented.

--

--

Vaibhav Anand
Embitel Technologies

An automotive geek and enthusiast writing mostly about the electronics and software aspects of automotive industry