This content requires the Adobe Flash Player and a browser with JavaScript enabled. Click here to get the latest version of Adobe Flash Player.

Testing the FlexRay automotive bus

IN RECENT YEARS, THE EVENT-DRIVEN CAN (CONTROLLER-AREA-NETWORK) SERIAL BUS HAS BECOME THE COMMUNICATIONS BACKBONE FOR AUTOMOTIVE ELECTRONICS, PROVIDING THE INTERACTION BETWEEN THE MANY SEPARATE SENSORS AND ACTUATORS, AND THE ECU. HOWEVER, AS COMMUNICATIONS SPEEDS HAVE INCREASED AND AUTOMOTIVE ELECTRONICS HAVE EXPANDED INTO MORE— AND MORE SAFETYCRITICAL— AREAS, THERE HAS BEEN A SHIFT IN THE TECHNOLOGY.

BY JOHNNIE HANCOCK • AGILENT TECHNOLOGIES -- EDN Europe, 01 May 2008

For the most demanding automotive communications applications, designers are moving away from using CAN, operating at 50 kbps, and towards FlexRay, operating at 10 Mbps. The integrity of automotive communications systems becomes paramount in areas such as collision avoidance, steering and braking. FlexRay’s designers developed this bus to address the specific challenges that arise in this “drive-by-wire” environment. Critical to the implementation of these systems is the fact that the communications should be deterministic and error-free.

FlexRay is, by design, time-triggered and deterministic. Nodes on the bus always transmit digital packets of information within their designated time slots according to a global timing schedule. Error-free means just that: unlike in general computing, where systems can tolerate and recover from low bit-error rates, in automotive safety system errors can have serious results.

The high-baud-rate, time-triggered, deterministic architecture and the requirement for error-free operation put significant demands on the design and testing of these systems. Add to these the inherently mixed-signal nature of automotive systems, together with the need to operate in harsh environments, and the challenge in designing and testing automotive communications products becomes apparent.

The oscilloscope is one of the fundamental testing and debugging tools that designers use. MSOs (mixed-signal oscilloscopes) provide the capability to time-correlate signal activity from analogue sensors, serial communications, digital control and I/O within ECUs, and so can address directly the mixed-signal nature of automotive electronics. Engineers can also use oscilloscopes to examine the physical-layer and signal characteristics of the serial data using eye-pattern measurements.

In other measurement domains, however, oscilloscopes have been less applicable. Although excellent for looking at the electrical characteristic of the signal, they have not been able to display the protocol characteristics. For this view of the data, the instrument of choice has more typically been the protocol analyser. However, the addition of protocol-decode capabilities within today’s oscilloscopes expands their usefulness in analysis of specific buses.

MIXED-SIGNAL TESTING

Automotive electronic systems are by definition mixedsignal systems consisting of multiple analogue, digital, and serial signals. FlexRay designers need the ability to correlate multiple inputs of mixed-signal activity within their automotive systems, and the MSO is an obvious candidate to make these types of measurements, and to view and time-correlate analogue sensor inputs, differential serial signals—such as those FlexRay employs—and digital control and I/O signals within the ECUs (Figure 1).

The—theoretically—error-free nature of the FlexRay protocol is partially attributable to its time-triggered architecture. FlexRay signal transmissions must occur within a specified window of time. Verifying the timing of physical-layer FlexRay signals to the global timing schedule is therefore very important to FlexRay designers so they can eliminate possible timing errors. Consequently, a key feature of a FlexRay-capable measurement package is to display a time-correlated global timing trace, verifying correct signal timing of FlexRay slots along with colour-coded static and dynamic segments.

For safety-critical FlexRay systems, it is extremely important to eliminate all possible errors. When a driver turns the steering wheel to avoid a collision, the electronic steering system must respond immediately. Identifying errors goes beyond merely detecting CRC (cyclic-redundancy-check) errors; it must include identifying possible timing errors, such as slot-boundary violations. This requires a robust set of errortriggering and error-decoding features (Figure 2). The data multiplexing communication possibilities that the FlexRay protocol allows means that designers need to be able to trigger oscilloscope acquisitions on specific communication cycles— not just cycle number, but cycles based on a base and repetition rate.

The measurement of signal integrity on automotive differential signals such as the physical layer of the FlexRay serial bus requires differential active probing. In addition, FlexRay designers must often test their embedded designs under very extreme conditions in environmental chambers. These extreme conditions may include testing ECUs and differential serial buses at temperatures exceeding 150°C, but unfortunately, the active circuitry in today’s typical active probes cannot tolerate temperatures exceeding 55°C. One solution is to extend and displace the probe’s active amplifier to be outside the environmental chamber (Figure 3). With this configuration, the passive probe heads can be connected to test points within the chamber with temperatures ranging from -55°C up to +155°C.

EYE-PATTERN MEASUREMENTS

Making eye-diagram measurements with an oscilloscope provides a composite picture of signal integrity and jitter. For serial-bus signals with embedded clocks such as FlexRay, eye-diagrams must be created using an oscilloscope with software that extracts—or recovers—the clock from the data signal. The instrument uses the recovered clock to “slice” the digitised waveform into multiple bit segments— unit intervals—that it then overlays—or “folds”—into an eye-diagram display. This type of measurement is called a “real-time eye.” Using this approach, the instrument creates eye-diagram measurements from single-shot, real-time acquisitions.

CLOCK-RECOVERY EMULATING

The most critical component in creating accurate realtime “eyes” is the oscilloscope’s software-generated clockrecovery algorithm. Such algorithms usually employ an emulation of the clock-recovery hardware within the corresponding bus’s receiver hardware. FlexRay receivers resynchronise delayed sampling relative to each BSS (byte-startsequence) event within received frames. To emulate this in software, oscilloscopes first capture one or more FlexRay frames using real-time sampling. The scope’s clock-recovery software then locates the first TSS (transmission-startsequence) event. From this point, the oscilloscope’s software can easily find the first BSS event by locating the first complete falling edge after the TSS event. The oscilloscope’s software then generates eight ideal clocks based on the oscilloscope’s own timebase (Figure 4).

For 10-Mbps FlexRay, the falling edge of the second BSS event should occur exactly 1 µsec after the first BSS event. The ’scope looks for this next BSS event to occur within 10-bit (±½-bit) fields after the prior BSS event. Once it finds this next BSS event, it generates an additional eight ideal clocks synchronised to this BSS event. This process of generating eight ideal clocks synchronised to each BSS event continues until the ’scope detects the FES (frame-end-sequence) event. If the ’scope has captured multiple static and dynamic frames into its deep acquisition memory, it will repeat this process of generating ideal clocks synchronised to each BSS event for all captured frames. However, if it fails to find the falling edge of a BSS event within ±½-bits fields of its ideal location, clock recovery will abort until detection of the next TSS event.

A software-generated FlexRay clock is not a real signal— even though some ’scopes can display this reference-clock waveform with ideal edges (infinitely fast). A better way to think of a software-generated clock is to think of it as simply the placement of ideal reference points on the digitised FlexRay waveform as the reference lines in Figure 4 indicate.

After generating ideal clocks synchronised to each BSS event for the entire acquisition, the ’scope then “slices” the acquired waveform into bit-field segments based on the timing of the recovered clocks. It then overlays these “slices”, which will consist of data-bit segments only, on top of one another to create the real-time FlexRay eye-diagram (Figure 5). One major advantage of a software-recovered clock as opposed to a real hardware-recovered clock is that the software-generated clock possesses no jitter; using this clock to create oscilloscope eye-diagrams eliminates oscilloscope trigger jitter that degrades actual jitter-measurement accuracy. The type of triggering selected for a real-time eyediagram measurement is irrelevant.

Once the ’scope has produced the eye diagram, the engineer can apply FlexRay masks for automatic pass/fail testing, using mask test files that will vary depending upon the specific test plane—TP1, TP2, TP3 or TP4—, the baud rate, the clockrecovery method and the observation window. Mask testing can acquire a specified number of waveforms or a specified number of unit intervals (bit fields), or run repetitively until detection of a mask violation (“stop-on-failure”). A stop-onfailure eye test can be very useful for running long-term or overnight testing to detect very infrequent or random communication problems.

EYE-MASK FAILURES

If you configure the ’scope to carry out a stop-on-failure mask test, it should then be possible to “unfold” the eyepattern waveform to restore the last captured real-time waveform that generated the failure condition, thereby revealing the location of each mask violation within a particular FlexRay frame. Figure 6 shows a TP1 FlexRay stop-on-failure mask test using a receiver-clock-recovery algorithm. This test uncovered a severe and infrequent timing problem in the synchronous system under test. This timing error occurred after acquiring over 7000 FlexRay cycles (3 msec cycle time), and after capturing and measuring edge timing of more than 14,000,000 unit intervals (100-nsec bit intervals) in a 10-Mbps synchronous FlexRay system. Total test time was approximately 1 h 45 min before capturing this first mask violation.

The un-folded FlexRay eye pattern, together with protocol decoding, reveals that the first failure occurred during static frame ID:6 (Figure 7). The highlighted red waveform segment near the centre of the display indicates the real-time location of the timing violation relative to the beginning of the frame.

With the scope’s timebase expanded around this unfolded mask failure, the timing of an errant pulse relative to the recovered clock is revealed (Figure 8). Each differential FlexRay signal edge (top trace) should be coincident with each falling edge of the software recovered clock (bottom trace). It appears that the rising edge of the eighth bit of the ninth byte of frame ID:6 (second pulse displayed) occurred approximately 30 nsec late. Also, note that the binary decode indicates that this payload byte has a value of 0000 0001.

Further analysis determined that the errant pulse that generated the mask violation wasn’t supposed to be the eighth bit of this byte. This pulse was actually the next BSS pulse, which should precede the 10th byte of the frame. It occurred approximately 85 nsec early and slid into the ninth byte, which was supposed to be a null byte (0000 0000). In an ideal 10-Mbps FlexRay system, BSS events occur exactly 1 µsec apart. This timing violation has produced what appears to be a coding error in the FlexRay system.

PROTOCOL-DECODE ANALYSIS

The use of an MSO to view analogue and digital signals concurrently and of an oscilloscope to make eye-pattern measurements allows designers to debug the physical and signal layers of the communications systems very effectively. Recent developments have added protocol-decoding within certain oscilloscopes. Using these capabilities, the instrument can display a protocol-decode trace along with the signal trace. The approach is to firstly select the data rate, for example 2.5, 5.0 or 10.0 Mbps. Having set the the baud rate and cycle time, the oscilloscope can automatically select the optimum sample rate, memory depth, clock-recovery method and triggering to repetitively capture an entire FlexRay cycle while triggering on one unique TSS.

The resulting FlexRay decode analysis will present a timecorrelated decode trace with tic marks as well as a listing window view (Figure 9). The decode list applies to all frames that have been captured in an acquisition, including the index number and time-stamp value for each frame. For FlexRay signals, the window shows the frame ID, the cycle number and the payload. The listing-window allows the user to scroll through decoded serial packets to find particular events of interest in the transmission, correlated to the waveform display.

AUTHOR’S BIOGRAPHY
Johnnie Hancock is a signal-integrity applications engineer within Agilent Technologies’ Electronic Products Group. He began his career with Hewlett-Packard in 1979 as an embedded-hardware designer and holds a patent for digital oscilloscope amplifier calibration. Johnnie is currently responsible for worldwide automotive applications supporting Agilent’s digitising oscilloscopes.

 

Our Sponsors



Ads by Google