Page 17

EDNE MAY 2014

Accelerate CAN-bus debugging with CAN-dbc symbolic triggering and decoding Figure 1: Triggering on and decoding frame 0x201; the measurement is successful but requires the extra work of abstracting the hex code into application-specific meaning. Figure 2: With symbolic triggering and decoding capability, you can work with human-readable terminology, making troubleshooting faster and much more intuitive. Debugging the Controller Area Network (CAN) buses used in today’s automotive systems usually requires investigating both the logical and physical layers. Dedicated CAN bus analyzers exist for debugging at the logical level, but the oscilloscope is the primary measurement tool for testing and debugging the physical layer. The electrical environment in automobiles is naturally harsh with lots of noise and often unexpected transients. The core competence of an oscilloscope is its ability to capture and display details of the noise and infrequent transients that could be producing CAN bus errors. Using a scope to capture data on the CAN bus To assist in synchronizing on and identifying specific CAN frames (packets of data), most of today’s mid-range and higherperformance oscilloscopes have the ability to trigger on and decode the CAN bus in a hexadecimal and/or binary format (Figure 1). In this example, the oscilloscope has been set up to trigger on frame ID 0x201(HEX). In addition to decoding the frame ID, the oscilloscope also decoded the 8-byte data field as “0B A8 00 00 27 10 00 00.” The measurement capture is successful, but it leaves the engineer with the task of abstracting the result to a result that is meaningful within the context of the application. Elevating the conversation to humanspeak with CAN-dbc The new CAN-dbc symbolic trigger and decode capability in Agilent InfiniiVision 4000 X-Series scopes offer the best of both approaches: the high-level symbolic perspective of a dedicated CAN bus debugger and the physical layer investigation capabilities of a high-performance oscilloscope. Figure 2 shows the same measurement but now triggering on and decoding the CAN bus symbolically using the enhanced CAN-dbc symbolic trigger and decode capability. Instead of attempting to manually interpret cryptic hexadecimal codes, the oscilloscope symbolically decodes it in “human language.” In this example, the oscilloscope is decoding a message named “Brake_Torque.” In addition, the oscilloscope translates raw bits into signed variables with units as well as encoded states. For instance, Total_Torque = 131.064 kft-lbs, as opposed to 0B A8. In order for the oscilloscope to decode the CAN bus symbolically, you’ll need to import that particular vehicle’s .dbc file (“data base CAN”) into the scope. All automotive makers have created .dbc files for their vehicles’ CAN buses. However, these files are proprietary and top secret, so if you don’t have access to one, you’ll need to create it. The most common tool used today is Vector Informatik GmbH’s CANdb++ software. Once the .dbc has been imported into the oscilloscope, you have the option of triggering on and decoding the bus in low-level hexadecimal format, high-level symbolic format, or both. This makes testing and debugging the CAN bus quicker and more intuitive. To learn more about Agilent’s InfiniiVision 4000 X-Series oscilloscopes and mixed signal oscilloscopes for automotive applications, visit www.agilent.com/find/scopes-auto. SPOTLIGHT


EDNE MAY 2014
To see the actual publication please follow the link above