Automotive Low Speed Serial Bus Analysis with Tektronix Oscilloscopes
Automotive Serial Bus Overview I 2 C SPI CAN FlexRay USB (Infotainment: UserDevice Access) MOST 50 / 150 (Infotainment: Network) Ethernet (BroadR-Reach PHY, Broadcom) MIPI (D-Phy, DSI / CSI) HDMI / MHL SPI 2
Trace Data Flow Through an Automotive Network Trace serial data flow between nodes through a network Simultaneously display messages at transmitter and receiver to verify continuity and propagation delays Trace serial data flow between network segments separated by a gateway Simultaneously display messages from multiple buses, at different speeds, or even different bus standards Diagnostic LIN Engine Control ESP Gear Box Right Door Left Door CAN Gateway CAN CAN Seat Control Climate Control Mobile Phone Air Bag ABS Sensor Car Radio Motor Multi Media Module ABS LIN CAN 3
Automotive Bus Technology - Application Areas Data Backbone for ADAS (Active Driver Assistance Systems) Data Interchange with other specific automotive bus systems (CAN/Flexray) Source: www.mostcooperation.com 4
Midrange Scope Portfolio MSO/DPO2000 MSO/DPO3000 MSO/DPO4000B MSO/DPO5000 DPO7000C 200-100 MHz 1 GS/s 500-100 MHz 2.5 GS/s 1 GHz 350 MHz 5 2.5 GS/s 2 GHz 350 MHz 10-5 GS/s 3.5 GHz 500 MHz 40-5 GS/s 1M Samples Max 5 M Samples Max 20 M Samples Max 250 M Samples Max 500 M Samples Max Embd. OS MS WIN 7 Tektronix Confidential
Debugging Serial Buses with the MSO/DPO Series Automated Trigger, Decode and Search for Serial Buses 4000B Series 3000 Series 2000 Series Bandwidth 1 GHz, 500 MHz, 350 MHz 500 MHz, 300 MHz, 100 MHz 200 MHz, 100 MHz Channels 4 analog 16 digital (MSO Series) 2 or 4 analog 16 digital (MSO Series) 2 or 4 analog 16 digital (MSO Series) Record Length 20 M points 5 M points 1 M points Serial Bus Analysis # of Simultaneous Decoded Buses I 2 C, SPI USB Ethernet CAN, LIN, FlexRay RS-232/422/485/UART I 2 S/LJ/RJ/TDM MIL-STD-1553 I 2 C, SPI CAN, LIN RS-232/422/485/UART I 2 S/LJ/RJ/TDM 4 2 2 I 2 C, SPI CAN, LIN RS-232/422/485/UART
Speed debug of serial buses with the MSO/DPO5000 Series MSO/DPO5000 Series 350 MHz to 2 GHz Up to 250 M record length Comprehensive verification including compliance with jitter and eye validation Physical layer testing for USB 2.0 and Ethernet 10/100/1000BASE-T Serial bus decode, trigger and search support for: I 2 C SPI UART/RS-232 USB 2.0 MOST 50 / 150 Automated Decode, Trigger, Search and Eye Diagram Analysis 7
In-Depth Analysis of Serial Buses with the DPO7000 Series Automated Decode, Trigger, Search and Eye Diagram Analysis DPO7000 Series 500 MHz to 3.5 GHz Up to 500 M record length Physical layer testing for USB 2.0, Ethernet and MIPI Serial data characterization with jitter and eye analysis Supported serial buses: I 2 C SPI CAN LIN FlexRay UART/RS-232 MOST 50 / 150
V6.4.0 Firmware for 5k, 7kC, 70kC/D WIN7 Scopes Great new features New bus standards support Improvements to Visual Trigger New mark all trigger events Search capability Improved Zoom and Cursor button operation Measurements on digital channels MATLAB and MS Visual Studio math plug-in functionality Performance improvements Faster MSO/DPO5k operation FastFrame and long record length speed increased Defect fixes for many customer-reported bugs Larger HDD and SSD New PS2 power bundle Available end of June 2012 Available for all demo units now - update yours today! New one-step complete update with deployment package
New Standards Support CAN/LIN/FlexRay (trigger/decode/search) MIL-STD-1553B (trigger/decode/search) PCI Express gen 1/2/3 (trigger (70k)/decode/search) SPI 2-wire (trigger/decode/search) 8b/10b added to MSO/DPO5k and DPO7kC (decode/search) MIPI D-PHY added to MSO/DPO5k (decode/search) Electrical Compliance Measurements MOST 50 and 150 electrical compliance Thunderbolt
LSS Trigger/Decode/Search CAN/LIN/FlexRay: SR-AUTO MIL-STD-1553: SR-AERO 2-Wire SPI added to SR-EMBD CAN Bus: SR-AUTO MIL-STD-1553: SR-AERO 2-Wire SPI: SR-EMBD
How do I probe serial digital buses? Digital buses are not digital Digital signals do not necessarily have only two discrete levels Digital probes are not digital Everything you know about analog probing still applies Minimize DC and AC loading Voltage measurements are always differential Minimize lead inductance Bus and Waveforms display of I 2 C signal The real signal must be delivered to the oscilloscope s hardware or software comparator, where it can be compared to the digital threshold value(s) 12
What do the probing and acquisition architectures look like P6616 passive probe Digital input circuit (logic analyzer ASIC) acquisition circuit 0.2pF front-panel connector 3pF 100k coax - + Acquisition System 13
Digital Acquisition System MSO/DPO4000B / 5000 Series and P6616 Digital Probe Specification MSO4000 MSO4000B Maximum Sample Rate 500MS/s 16.5GS/s with MagniVu Maximum Input Toggle Rate 350 MHz 500 MHz DC Input Voltage Range ± 15 V ± 42 Vpeak Maximum Input Voltage Swing 6 Vp-p centered on threshold 500MS/s 16.5GS/s with MagniVu 30 Vp-p 200MHz 10 Vp-p >200 MHz Input Impedance 20 kohm 100 kohm Input Capacitance 3 pf 3 pf Threshold Range -2 V to +5 V ± 40 V Minimum Input Swing 500 mvp-p 400 mvp-p Minimum Detectable Pulse 1.5 ns 1 ns MSO5000 500MS/s 16.5GS/s with MagniVu 500 MHz ± 42 Vpeak 30 Vp-p 200MHz 10 Vp-p >200 MHz 100 kohm 3 pf ± 40 V 400 mvp-p 1 ns P6616 16-channel digital probe matched to the digital acquisition system high end digital specification 14
I 2 C (Inter-Integrated Circuit) Used for chip-to-chip communication between microcontrollers and A/Ds, D/As, FPGAs, sensors, etc. Uses two single-ended, bi-directional signals: clock and data (Half Duplex) Any I 2 C device can be attached to the bus Data rates: Standard Mode (100 kbps) Fast Mode (400 kbps) High Speed Mode (3.4 Mbps) 15
I 2 C (Physical Part) +V Pull-up resistors SDA SCL Master Device 3 Device 4 16
Input Source Selection (example: I 2 C) CH1 CH4 D0 D15 (MSO) View different busses simultaneously Channel Labeling 17
I 2 C Message Structure Start: Indicates the device is taking control of the bus and a message will follow Address: 7-bit or 10-bit number representing the device address to read or write Data: Integer number of bytes read from or written to the device Acknowledge: 1-bit from the slave device acknowledging the master s actions Stop: Indicating the message is complete and the master has released the bus 18
Serial Debug Manually Decoding Serial Bits Engineers must manually count each bit and determine if it is a 1 or a 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 19
Serial Debug Manually Decoding Serial Bits Engineers must then convert the data to an understandable format First three bits are most significant digit of a 7-bit address Next four bits are least significant digit of a 7-bit address Read or Write Most significant digit of 8-bit byte Least significant digit of 8-bit byte 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 1 1 0 = Read data 14 and 16 from Address 50 5 0 R 1 4 1 6 20
Serial Debug Serial Triggering and Decode I2C Decoding is done by oscilloscope for the engineer There must be a better way 21
I 2 C Message Flow Control Acknowledge/No Acknowledge Indicates success or failure of a data transmission or the continuation of a transfer Generated by holding the SDA low on the 9th clock pulse ACK NACK SDA SCL SDA SCL 1 2 3... 8 9 1 2 3... 8 9 22
I 2 C Solution on Tektronix Oscilloscope 23
SPI (System Peripheral Interface) Used primarily to communicate between microcontrollers and their immediate peripheral devices Typical configuration has four signals: SCLK, MOSI, MISO, SS Data is simultaneously transmitted and received SS line used to specify slave device Each unique device on bus has its own SS signal from master Multiple bus configurations are allowed Network can use 2-, 3-, or 4-wire bus topology Data rates up to 50 Mbps SS enables slave device to accept data SS MOSI data from the master to a slave MISO data from a slave to the master SCLK serial clock driven by Master MSB MSB MOSI (n bits) MISO (n bits) SCLK LSB LSB 24
SPI (System Peripheral Interface) Single Master Multiple Slaves Single Master hardwired to Single Slave SPI Bus Hardware Configurations 25
Serial Debug Serial Triggering and Decode There is more than just decoding Trigger on packet content Search and mark packet content View data in an Event Table format View two buses simultaneously SPI I 2 C RS-232 FlexRay CAN LIN 26
CAN (Controller Area Network) Used for system-to-system communication in Automotive, Industrial Automation, and Medical Equipment Serial asynchronous, multi-master, layered communication network Sophisticated error detection and error handling mechanisms Flexible signaling support for low-cost implementation Messages are broadcast to all nodes on the network Physical bus is single-wire or dual-wire, and fault tolerant Data rates from 5 kbps to 1 Mbps CAN High Speed Differential Bus Signal CAN Bus Bit Rate Table CAN Controller Tx Rx CAN_H CAN_L Rx Tx Electronic Control Unit 3.5V 2.5V dominant CAN-H 1 0 1 CAN Bit Rate 1 Mbps 1 s 800 Kbps 1.25 s 500 Kbps 2 s 250 Kbps 4 s 125 Kbps 8 s 83.3 Kbps 12 s Min. CAN Pulse Width CAN Physical Layer 1.5V CAN-L recessive recessive 62.5 Kbps 16 s 50 Kbps 20 s 33.3 Kbps 30 s 20 Kbps 50 s 10 Kbps 100 s 27
CAN is a differential BUS CAN High Speed Differential Bus Signal CAN Controller Tx Rx CAN_H CAN_L Rx Tx Electronic Control Unit 3.5V 2.5V dominant CAN-H 1 0 1 CAN Physical Layer 1.5V CAN-L recessive recessive Tx + + path + + Rcv - - - -
120Ὠ 120Ὠ In-Depth Analysis of Network Performance 40 meters Node 1 Node 2 Node 10 CAN Network Near End Far End Locate and analyze signal integrity problems with eye diagrams Characterize different oscillator tolerances and propagation delays between nodes for synchronizing the network Monitor bus utilization to ensure efficient use of the network 29
Eye diagram measurements Fast Data Rates, More HF Loss Clean, open, logical 1 & 0 at launch from transmitter Logical 1 & 0 can be hard to distinguish at end of long interconnects; (this is often called a closed eye ) Tx + + path + + Rcv - - - - Fast, sharp, edges at transmitter launch Smeared edges at end of long interconnect. Reference Maxim Note HFDN-27.0 (Rev. 0, 09/03)
CAN Data and Remote Frame Overview SOF: begins with a start of frame (SOF) bit Arbitration: Identifier (address) and Remote Transmission Request (RTR) bit Control: 6 bits including Identifier Extension (IDE) bit and Data Length Code (DLC) Data: zero to eight bytes of data CRC: 15-bit cyclic redundancy check code and a recessive delimiter bit ACK: acknowledge field is two bits long EOF: 7 recessive bits indicate the end of frame (EOF) INT: intermission field of three recessive bits indicates the bus is free 31
Characterize System Timing Characterize timing between bus messages and system operation Requires waveform displays time-correlated with decoded messages Characterize timing differences which occur when adding a new network node to an existing network Automotive application example: Measure worst-case time from crash sensor output to airbag activation Measure variations in timing of airbag activation with varying levels of CAN bus traffic 32
CAN Bus DPO7000 CAN Trigger 33
CAN Bus DPO7000 CAN Analysis Application Select Function : Decoding Timing Analysis 34
CAN Bus DPO7000 CAN Analysis Application Configure : Trig.-Source Bus-Source 35
CAN Bus DPO7000 CAN Analysis Application Trig.-Configure : Field Type Field Value 36
CAN Bus DPO7000 CAN Analysis Application Decoding Results : Field Value Timing Result 37
CAN Bus DPO7000 CAN Analysis Application Decoding Results : Correlation to Acq.-Mem 38
Characterizing Oscillator Tolerance and Propagation Delay Oscillator tolerance of a CAN node Specify the specific ID for trigger condition Result will include ACK and without ACK bit With ACK bit, shows the impact of receiving CAN node oscillator tolerance on transmitting node Propagation Delay Connect two channels to any two CAN nodes Result is directly available 39
Monitoring CAN Traffic for Bus Utilization Measure at specific ID, error frame or overload frame Specifies percentage of time traffic present in the CAN bus Type of traffic can be analyzed Frame count Tektronix DPO7000 Series with TDSVNM option 40
CAN Trigger Overview 41
FlexRay 2.1 (3.0) FlexRay is a automotive bus still being developed by a group of leading automotive companies and suppliers known as the FlexRay Consortium The physical bus can be unshielded twisted pair, or shielded twisted pair to improve EMC performance FlexRay is a differential serial bus configured in three recurring segments: Header, Payload, and Trailer Each frame contains a static and dynamic segment, and bus idle time concludes each frame Transmitted data rates up to 10 Mbps Automotive Manufacturers are finding that existing automotive serial standards such as CAN and LIN do not have the speed, reliability, or redundancy required to address X-by-wire applications such as brake-by-wire or steer-by-wire. 42
FlexRay Frame Structure Header Segment Contains Indicator Bits, Frame ID, Payload Length (in words), Header CRC, and Cycle Count Payload Segment Contains data transferred by the frame. Maximum payload length is 127 words (254 bytes) Trailer Segment Contains a single 24 bit field [three 8 bit CRC registers] for header and payload protection 43
FlexRay Terms and Abbreviations FlexRay Bus Decode Terms TSS (Transmission Start Sequence): initiate network connection setup. FSS (Frame Start Sequence): immediately follows TSS Indicator Bits: provides Header Segment preamble information. Frame Id (Frame Identifier): defines to which slot frame is transmitted. Payload Length: indicates data size being transferred in the frame. Header CRC: contains CRC computed from portion of Header Segment. Cycle Count: holds value that increments for each comm. cycle start. Data (Payload): contains data transferred by frame (254 bytes max.). Trailer CRC: protects against improper header and payload modification. FES (End of Frame): immediately follows the Trailer CRC DTS (Dynamic Trailing Sequence): indicates a dynamic frame. CID (Channel Idle Detection): indicates end of comm. (Idle: BP=BM) Data_0: negative differential voltage between BP and BM. Data_1: positive differential voltage between BP and BM. Idle_LP (LowPower): biased to ground. No current to BP or BM. Idle: biased to a voltage. No current to BP or BM. BP (Bus Plus) and BM (Bus Minus) lines used to balance the differential communications network. 44
FlexRay Bus FlexRay Analysis Application Configure : Data Source Probing Trigger 45
FlexRay Bus FlexRay Analysis Application Results : Decoding CRC Analysis Correlation to Acq.-Mem 46
FlexRay Bus FlexRay Analysis Application Results : Timing Meas. Sync. Meas. Eye/Mask Test TIE Zoom 47
FlexRay Bus FlexRay Analysis Application Real Signals MASK violation could be ID related 48