Testing Automotive Communications Systems

advertisement
Testing the FlexRay Automotive Bus
by
Johnnie Hancock
Agilent Technologies
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 safety critical areas there has been a shift in the
technology. For the most demanding applications automotive communications are
now moving away from CAN operating at 500Kbps to FlexRay operating at 10Mbps.
The integrity of automotive communications systems becomes paramount in areas
such as collision avoidance, steering and braking. FlexRay has been developed 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 designed to be time triggered and deterministic. Digital packets of
information are always transmitted within their designated time slots by virtue of a
global timing schedule. Error-free means just that. Unlike in computing where low bit
error rates can be tolerated, in automotive safety systems errors can have a serious
result.
The high baud rate, time triggered, deterministic architecture and the requirement for
error-free operation put significant demands in the design and testing of these
systems. Add to these the inherently mixed signal nature of automotive systems and
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 used by
designers. 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.
Oscilloscopes can also be used to examine the physical layer and signal
characteristics of the serial data using eye pattern measurements.
In other areas however the oscilloscope has 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 a protocol
analyser has been more typically used. However, this is changing with the
development of new protocol decode capabilities within today’s oscilloscopes.
Mixed Signal Testing
Automotive electronic systems are by definition mixed-signal 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. A
mixed signal oscilloscope is a natural fit for these types of measurements. With an
MSO, designers can easily view and time-correlate their analogue sensor inputs,
their differential serial signals, such as FlexRay, and their digital control and I/O
signals within their ECUs using a single instrument. With advanced FlexRay
triggering and decoding, they can also correlate all of the mixed signals to the
FlexRay bus.
Time-correlate:
Vehicle analogue
sensor inputs
+
Differential
FlexRay signal
+
ECU digital
control signals
+
FlexRay global
timing and frame
decode traces
Figure 1: Mixed-signal measurements using an MSO, incorporating FlexRay
Global Timing trace.
The theoretical 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. Agilent’s MSO FlexRay measurement solution
provides the time-correlated global timing trace displayed on the MSO’s display. This
feature makes it easy for designers to verify 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 just
detecting CRC errors and must include possible timing errors such as slot boundary
violations. This requires a robust set of error triggering and error decoding. 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.
Static and Dynamic
Slot Boundaries
Figure 2: Time-correlated slot/segment boundary markers relative to FlexRay frames.
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
degrees Celsius. Unfortunately, the active circuitry in today’s typical active probes
cannot tolerate temperatures exceeding 55 degrees C. One solution is to extend and
displace the probe’s active amplifier to be outside the environmental chamber (Fig 3).
With this configuration, the passive probe heads can be connected to test points
within the chamber with temperatures ranging from -55 degree C up to 155 degrees
C.
Figure 3: The Agilent Extreme Temperature Cable Extension Kit allows differential active
probing within environmental chambers at extreme temperatures.
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 special
software that extracts/recovers the clock from the data signal. The recovered clock is
then used to “slice” the digitised waveform into multiple bit segments (unit intervals)
that are then overlaid — or folded — into an eye-diagram display. This type of
measurement is called a “real-time eye.” Using this approach, eye-diagram
measurements can be created from single-shot, real-time oscilloscope acquisitions.
Emulating FlexRay Receiver Clock Recovery
The most critical component in creating accurate real-time “eyes” is the
oscilloscope’s software-generated clock recovery algorithm. Software clock recovery
algorithms are usually based on emulating a receiver’s clock recovery hardware.
FlexRay receivers resynchronise delayed sampling relative to each byte start
sequence (BSS) 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 transmission start
sequence (TSS) event. From this point, the scope’s software can easily find the first
BSS event by locating the first complete falling edge after the TSS event. The scope
software then generates eight ideal clocks based on the scope’s timebase, as shown
in Figure 4.
Figure 4: Oscilloscope software clock recovery generates
eight ideal clocks synchronized to each BSS event
For 10-Mbps FlexRay, the falling edge of the second BSS event should occur exactly
1 µs after the first BSS event. The scope looks for this next BSS event to occur within
10 +/- ½ bit fields after the prior BSS event. Once it finds this next BSS event, the
scope generates an additional eight ideal clocks synchronized to this BSS event.
This process of generating eight ideal clocks synchronized to each BSS event
continues until the scope detects the frame-end-sequence (FES) event. If multiple
static and dynamic frames are captured using the scope’s deep acquisition memory,
the scope will repeat this process of generating ideal clocks synchronized to each
BSS event for all captured frames. However, if the scope 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 indicated by the
reference lines shown in Figure 4.
After generating ideal clocks synchronized 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. These “slices,” which will consist of data
bit segments only, are then overlaid on top of one another to create the real-time
FlexRay eye-diagram, as shown in Figure 5. One major advantage of a softwarerecovered clock as opposed to a real hardware-recovered clock is that the softwaregenerated clock possesses no jitter; using this clock to create oscilloscope eyediagrams eliminates oscilloscope trigger jitter that degrades actual jitter
measurement accuracy. The type of triggering selected for a real-time eye-diagram
measurement is irrelevant.
#
Figure 5: Real-time eye-diagram of one FlexRay cycle based on emulating a receiver’s
resynchronized clock recovery
Once the eye diagram is produced then FlexRay masks can be applied for automatic
pass/fail testing. Mask test files can be used for this. The mask test files will vary
depending upon the specific test plane (TP1, TP2, TP3 or TP4), the baud rate, the
clock recovery method and the observation window. Mask testing can be set up to
acquire a specified number of waveforms, a specified number of unit intervals (bit
fields), or to run repetitively until detection of a mask violation (stop-on-failure). A
“stop-on-failure” eye test can be very useful for running long-term or overnight testing
to detect very infrequent or random communication problems.
Analysing FlexRay Eye Mask Failures
If a “stop-on-failure” mask test is performed, it should then be possible to “unfold” the
eye pattern 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 7,000 FlexRay cycles (3 ms cycle time), and after
capturing and measuring edge timing of more than 14,000,000 unit intervals (100-ns
bit intervals) in a 10-Mbps synchronous FlexRay system. Total test time was
approximately 1 hour and 45 minutes before capturing this first mask violation.
Figure 6. FlexRay eye mask failure
When the FlexRay eye pattern is unfolded and protocol decoding is turned on, it can
be seen that the first failure occurred during static frame ID:6, as shown in 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.
Figure 7. Unfolding the eye reveals that a timing failure occurred during static frame #6.
With the scope’s timebase expanded around this unfolded mask failure, the timing of
an errant pulse relative to the recovered clock can be measured as shown in 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 ns late. Also, note that the binary decode indicates that
this payload byte has a value of 0000 0001.
Figure 8. Timing measurements on the errant FlexRay pulse reveals that a BSS pulse occurred nearly
one bit period early.
After further analysis, it was 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 that should precede the 10th byte of the frame. It
occurred approximately 85 ns 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 µs 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 the use of
an oscilloscope to make eye pattern measurements allow designers to debug the
physical and signal layers of the communications systems very effectively. However,
to view the protocol layer has typically requires to use of a protocol analyser as a
separate instrument. More recent developments have allowed the inclusion of
protocol decoding within the oscilloscope. Using these capabilities the signal trace
can be accompanied by a protocol decode trace. The approach is to firstly select the
data rate, for example 2.5, 5.0 or 10.0Mbps. Once the baud rate and cycle time is
set 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 Transmission Start Sequence (TSS).
The resulting FlexRay decode analysis will present a time-correlated decode trace
with tic marks as well as a listing window view. (Fig 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, cycle number and the payload.
Figure 9. Protocol decoding on an MSO using the Agilent N5402A Data Analysis Software.
The listing window allows the decoded serial packets to be scrolled through to find
particular events of interest in the transmission. The listing window and waveform
display are correlated by virtue of highlighting.
Summary
Designers using FlexRay technology require advanced oscilloscope measurements
beyond the capabilities offered by today’s scopes or protocol analysers alone.
In addition to accurately measuring the signal integrity of the physical layer of the
differential FlexRay bus, FlexRay designers need to be able to time-correlate actual
signal transmissions with the ideal global timing schedule.
The required “error-free” nature of FlexRay technology means that designers need to
be able to quickly debug their systems in order to detect any possible errors
conditions, and if they exist, relate them back to the differential FlexRay signal to see
if errors are a result of signal integrity issues. This requires a robust set of error
triggering and decoding in their scopes in order to quickly find problems.
FlexRay designers need the ability to view multiple analogue and signals
simultaneously so they can correlate mixed-signal activity, including digital signal
activity within ECUs correlated to the FlexRay signal, as well as to analogue sensor
inputs. This requires the use of a mixed signal oscilloscope (MSO). FlexRay
designers also need to be to test their systems/devices in temperature chambers at
extreme temperatures — often beyond the temperature range of today’s off-the-shelf
measurement equipment.
An MSO with advanced triggering, eye pattern measurements, protocol decoding and
harsh environment probing solutions give the designer the advanced set of tools
necessary to design and debug today’s automotive communications systems.
(2300 words)
Ref: PG/EDNEurope/March2008
Download