15

CAN System Engineering - content.schweitzer-online.de · Wolfhard Lawrenz C&S group GmbH, Waldweg, Wolfenbuettel, Germany Gabriel Leen BMW AG, Petuelring, Munich, Germany Roland Lieder

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

CAN System Engineering

Wolfhard LawrenzEditor

CAN System EngineeringFrom Theory to Practical Applications

1 3

ISBN 978-1-4471-5612-3 ISBN 978-1-4471-5613-0 (eBook)DOI 10.1007/978-1-4471-5613-0Springer London Heidelberg New York Dordrecht

Library of Congress Control Number: 2013951526

© Springer-Verlag London 1997, 2013This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violations are liable to prosecution under the respective Copyright Law.The use of general descriptive names, registered names, trademarks, service marks, etc. in this publica-tion does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.

Printed on acid-free paper

Springer is part of Springer Science+Business Media (www.springer.com)

EditorWolfhard LawrenzC&S group GmbHWolfenbüttelGermany

v

Preface

Controller Area Network—CAN—is a communication protocol, which had been developed by R. Bosch GmbH in the beginning of the 1980s.The design focus was to support robust applications in cars. The protocol then was introduced to the market in cooperation of Bosch and Intel. In the year 1990 Mercedes Benz was the first car manufacturer who applied CAN in a series application, in the S-class car for networking of body electronics. The first suppliers of CAN mo-dules at that time were Intel and Motorola. Currently almost all minor and ma-jor semiconductor manufacturers have CAN products in their portfolio. In 1997 24 million CAN interfaces were produced in 1 year; 2 years later there were already more than three times as many. Currently there will probably be more than a billion per year.

In the CAN introduction phase—in the end of the 80s and the beginning of the 90s—mostly so called “stand-alone” solutions were offered, which could be easily connected to any type of micro-controller. This strategy fostered the broad application of CAN, because CAN application was not only limited to the micro-controller families of the pioneer semiconductor manufacturers. Since the 90s more and more integrated solutions—CAN together with a microcontroller on one single chip—were launched on the market. However the so called transcei-ver—the interface between the analogue signals on the bus lines and the digital signals of the CAN controller—is even still today typically implemented in a se-parate chip due to its different semiconductor technology. The integrated version of CAN and micro-controller saves die size and connecting pins, increases relia-bility and reduces cost. These factors and the CAN quality itself are some reasons for the overwhelming CAN market dissemination. Currently, CAN communica-tion networking is applied widely in cars, but also in avionics, trains, military applications, industrial controls, etc.

The big interest in CAN is mirrored by the huge amount of publications rela-ted to CAN. This is another reason for this newly revised second edition of the English-language CAN book, which corresponds to the 5th edition of the German-language CAN book. This edition addresses the various issues and questions when applying CAN for communication networks. As such, there is a short introduction into the CAN basics. Furthermore, problems and solutions are discussed for the

vi Preface

physical layout of networks including EMC issues and topology layout. Addi-tionally, quality issues and, especially, test techniques are addressed. A special feature of this CAN book is that all the technical details have been contributed by different authors who are widely known specialists in their field of expertise.

Wolfhard Lawrenz, Wolfenbuettel July 2013

vii

Contents

1 CAN Basic Architectures ............................................................................. 1 Wolfhard Lawrenz

2 Physical Layer ............................................................................................ 41 Wolfhard Lawrenz, Cornelius Butzkamm, Bernd Elend, Thorsten Gerke,

Magnus-Maria Hell, Ursula Kelling, Bernd Koerber, Kurt Mueller, Christian Schmitz, Radoslaw Watroba and Rolf Weber

3 Data Link Layer Implementation ........................................................... 131 Wolfhard Lawrenz, Florian Hartwich, Ursula Kelling, Vamsi Krishna,

Roland Lieder and Peter Riekert

4 Higher Level Protocols ............................................................................ 173 Gangolf Feiter, Lars-Berno Fredriksson, Karsten Hoffmeister,

Joakim Pauli and Holger Zeltwanger

5 Applications .............................................................................................. 255 Guenter Reichart, Gabriel Leen, Nathalie Courmont, Ralph Knüppel,

Christian Schmid and Markus Brockmann

6 Testing ....................................................................................................... 283 Wolfhard Lawrenz, Federico Cañas, Maria Fischer, Stefan Krauß,

Lothar Kukla and Nils Obermoeller

Bibliography ................................................................................................... 345

Index ................................................................................................................ 351

ix

Contributors

Markus Brockmann WILO AG, Nortkirchenstrasse, Dortmund, Germany

Cornelius Butzkamm C&S group GmbH, Am Exer, Wolfenbuettel, Germany

Federico Cañas Quellweg 27, Berlin, Germany

Nathalie Courmont Airbus France S.A.S., 316 Route de Bayonne, Toulouse Cedex, France

Bernd Elend NXP Seminconductors Germany GmbH, Streesemannallee, Hamburg, Germany

Gangolf Feiter Concepts & Services Consulting, Alte Landstrasse, Heinsberg, Germany

Maria Fischer C&S group GmbH, Waldweg, Wolfenbuettel, Germany

Bernd Koerber Westsächsische Hochschule Zwickau, Dr.-Friedrichs-Ring, Zwickau, Germany

Lars-Berno Fredriksson Kvaser AB, Aminogatan, Mölndal, Sweden

Thorsten Gerke Synopsys GmbH, Karl-Hammerschmidt-Strasse, Aschheim- Dornach, Germany

Florian Hartwich Robert Bosch GmbH, Tuebinger Strasse, Reutlingen, Germany

Magnus-Maria Hell Infineon Technologies AG, Am Campeon, Neubiberg, Germany

Karsten Hoffmeister Elektrobit Automotive GmbH, Max-Stromeyer-Strasse, Konstanz, Germany

Ursula Kelling Infineon Technologies AG, Am Campeon, Neubiberg, Germany

Stefan Krauß Vector Informatik GmbH, Ingersheimer Strasse ,Stuttgart, Germany

Vamsi Krishna Xilinx India Technology Services Pvt. Ltd., Cyber Pearl, Hi-tec City, Madhapur, Hyderabad, India

Ralph Knüppel Airbus Deutschland GmbH, Hünefeldstr. Bremen, Germany

Lothar Kukla C&S group GmbH, Am Exer, Wolfenbüttel, Germany

Wolfhard Lawrenz C&S group GmbH, Waldweg, Wolfenbuettel, Germany

Gabriel Leen BMW AG, Petuelring, Munich, Germany

Roland Lieder Renesas Electronics Europe GmbH, Arcadiastrasse, Duesseldorf, Germany

Kurt Mueller Synopsys, Inc., 2025 NW Cornelius Pass Road, Hillsboro, OR, USA

Nils Obermoeller C&S group GmbH, Am Exer, Wolfenbüttel, Germany

Joakim Pauli Volvo Powertrain Corporation, Gropegårdsgatan, SE, Göteborg, Sweden

Peter Riekert Ingenieurbüro für IC-Technologie, Kleiner Weg, Wertheim, Germany

Christian Schmitz ELMOS Semiconductor AG, Heinrich Hertz Strasse, Dortmund, Germany

Christian Schmid Airbus Deutschland GmbH, Hünefeldstr. Bremen, Germany

Radoslaw Watroba STMicroelectronics Application GmbH, Bahnhofstraße, Aschheim-Dornach, Germany

Rolf Weber ELMOS Semiconductor AG, Heinrich Hertz Strasse, Dortmund, Germany

Holger Zeltwanger CAN in Automation (CiA) GmbH, Kontumazgarten, Nuremberg, Germany

Contributors

xi

Abbreviations

AABS Anti-lock Braking SystemABT Automatic Block Transfer for the transmission of multiple CAN

messages without CPU interactionAC Alternating CurrentACC Adaptive Cruise ControlACK Acknowledge, e.g. ACK-Bit in CAN-messagesADC Analog Digital ConverterAEE Architecture électronique électrique—Denotes the electrionic

architecture at PSA PEUGEOT CITROËNAEEC Airlines Electronic Engineering Committee—The AEEC deve-

loped standards and technical solutions for avionics, cabin sys-tems and networks

AFCAN Advanced Full-CAN—controller architecture microcontrol-lers from NEC with optional diagnostic functionality called “DAFCAN”

AFDX Avionics Full Duplex Switched Ethernet—Ethernet-based proto-col, supplemented by data rate control (QoS) and deterministic routing

AFIR (Xilinx) Acceptance Filter ID RegisterAFMR (Xilinx) Acceptance Filter Mask RegisterAFR (Xilinx) Acceptance Filter RegisterAM Amplitude ModulationAMP Arbitration on Message PriorityAPI Application Programming InterfaceARINC Aeronautical Radio Inc.—various technical standards of the

aerospace industry; create and maintained by ARINCARPANET Advanced Research Projects Agency Network—precursor to the

InternetASAP Asynchronous Service Access Protocol—describes a standard-

ized way to start, manage, and monitor long running servicesASC ASCII—ASCII-encoded text file

xii Abbreviations

ASCB-D Avionics Standard Communications Bus, rev. D—bus structure for networking avionics modules from Honeywell

ASCII American Standard Code for Information Interchange—known 7-bit character encoding with 128 characters, consisting of 95 printable and 33 non-printable characters

ASIC Application-Specific Integrated Circuit—also: Custom-Chip, called an application-specific integrated circuit

ASP Abstract Service PrimitiveATA Air Transport AssociationATM “Anyone-to-Many”—principle of communicationAUTOSAR AUTomotive Open System ARchitecture

BBACnet Building Automation and Control Networks—a network proto-

col for building automationBCC Block Check Character—approval of a data block in the longi-

tudinal parity checkingBCI Bulk Current InjectionBIOS Basic Input Output System—Software that allows the start of a

PCBRP Baud Rate Prescaler—also: BRPR, Baud rate prescaler, directs

the TQ-stroke from the oscillator clockBSI Boîtier de Servitude Intelligent—Acronym refers to the central

control unit in PSA PEUGEOT CITROËNBSP Bit Stream Processor—Bit stream processor, responsible for

serialization and deserialization of messages and the insertion and removal of transport information (Stuff-Bits, CRC etc.)

BSW Basic SoftwareBTL 1) Bit Timing Logic 2) Backplane Transceiver LogicBTR Bit Timing RegisterBUSK Bus Coupler for decentralized heating control system GENIAX

CCAN Controller Area NetworkCAN_H CAN High—also: CANH. One of the CAN bus lines, bus signal

with dominant at a higher potential than CAN-Low (CAN_L)CAN_L CAN Low—also: CANL. One of the CAN bus lines, bus signal

with dominant at a lower potential than CAN-High (CAN_H)CAT Category (of Twisted-Pair-Cables)CCT CAN Conformance Tester—test control software of the C&S

group for conformance testing of CAN controllersCD Compact DiscCEN (Xilinx) CAN Enable—Bit in the software reset register (SRR),

that activates the CAN controller

xiiiAbbreviations

CFI Canonical Format Indicator—Bit in the ethernet-frame-headerCiA CAN in Automation—international users and manufacturers

with stakeholders CAN Application Layer (IG CAL), CANopen (IG CANopen) and SAE J1939 (IG J1939) with the aim of sprea-ding and standardization of CAN in the industry

CIP Common Industrial Protocol—an open protocol for industrial automation applications

CISPR Comité international spécial des perturbations radioélectri-ques—official translation: International Special Committee on Radio Interference

CK CanKingdom—short form for the CanKingdom Meta-High-Level-Protocol

CLK ClockCMC Common Mode ChokeCO2 Carbon Dioxide—chemical compound of carbon and oxygen,

acidic, non-flammable, colorless and odorless gasCOAX Coaxial—short form for “Coaxialcable”, a cable with a central

inner conductor, a dielectric surrounding the insulation and an outer conductor which also serves as the shield, enclosed by a protective jacket

COB-ID Communication Object IdentifierCPU Central Processing UnitCRC Cyclic Redundancy Check—Method for determining a check

value for data in order to detect errors in transmission or storage may

CRI Certification Review Item—Subject to an acceptance testCS Chip SelectCSMA/CA Carrier Sense Multiple Access/Collision AvoidanceCSMA/CD Carrier Sense Multiple Access/Collision DetectionCSMA/CR Carrier Sense Multiple Access/Collision ResolutionCSR Command and Status RegisterCSV Comma Separated Values

DDAL Design Assurance LevelDBC CANdb-database-file, Channel definition for CAN bus in the

format of Vector computer scienceDC Direct CurrentDDM Driver Door ModuleDID Data IdentifierDIN formerly: German industrial standard; Today, the name is regar-

ded as characteristic of DIN community work of the German Institute for Standardization. DIN standards are recommendati-ons and can be applied

DI Digital I/O

xiv

DIP-Schalter DIP Dual In-line Package—several typical single-pole switches in a design with two parallel rows of connection

DLC Data Length Code—length code for the amount of user data in a CAN message

DMA Direct Memory AccessDMIPS/MHz Dhrystone MIPS/Megahertz—A synthetic benchmark program

to measure the integer performance; Loop cycles through the program are counted for performance evaluation, regardless of the number of pure instructions; Expressiveness by specifying better than pure MIPS

DN Data New—Flag that indicates the content of a receive buffer as updated

DOC Data Object CodeDP Process Fieldbus for Decentralized Peripherals—Profibus solu-

tion for Low-Cost-Sensor-/Actuator-networks specializing in brief messages at high speed

DPI Direct Power Injection—Method for direct interference cou-pling into the pins of the test object

DSC Digital Signal ControllerDSD Debug Service DataDSO Digital Storage OscilloscopeDSP Digital Signal ProcessorDTC Diagnostic Trouble CodeDVD Digital Versatile Disc

EEAN European Article Number—Product labeling for commercial

items, today: International Article NumberEASA European Aviation Safety Agency URL: www.easa.europa.euEAST-ADL Electronics Architecture and Software Technology—Architec-

ture Description LanguageEBCDIC Extended Binary Coded Decimals Interchange CodeeBUS Energy Bus—Simple UART protocol for heating applicationsECC Error Correction Code—Procedures that can help detect and

correct errors of redundancy in stored dataECM Engine Control ModuleECU Electronic Control UnitEDK Embedded Development KitEDS Electronic Data SheetEEC Exception Event Channel—Acronym for logical communication

channel ARINC 825 for exception eventsEED Emergency Event DataEEPROM Electrically Erasable Programmable Read-only Memory

Abbreviations

xv

EIB European Installation Bus – European installation of building automation, according to standard EN 50090, current name: KNX, standardized in ISO/IEC 14543-3

EMC Electromagnetic CompatibilityEME Electromagnetic EmissionsEMI Electromagnetic InterferenceEN European StandardEN, ENT Enable (Not), Enable Transmitter—Mode selection control sig-

nal for a transceiver, and for activating the transmission stageEOF End Of FrameESD Electro-Static Discharge –can destroy a semiconductorblock

without adequate safeguardsESPRIT European Strategic Program on Research in Information

Technology –EU European Union

FFAA Federal Aviation Administration URL: www.faa.govFCS Frame Check Sequence—Check information generated by the

CRC method and transmitted along with the protected message, in representations of data frames often called “CRC field” be lines, in an Ethernet frame, for example, a 32-bit CRC include field

FGID Function Group IdentifierFID Function Code IdentifierFIFO First In, First Out—Operation of data buffer structures and

items that were first stored, first outFLASH Flash-EEPROM, see EEPROMFLDU Front Left Door UnitFM Frequency ModulationFMC CAN Base Frame Migration Channel – Acronym for logical

communication channel ARINC 825FMS Process Fieldbus Message SpecificationFPGA Field Programmable Gate Array—An integrated circuit (IC) in

digital technology, in which a logic circuit can be programmedFRDU Front Right Door UnitFSA Finite State AutomationFTDMA Flexible Time Division Multiple Access—Minislotting method

GGA General AviationGIFT Generalized Interoperable Fault-tolerant CAN Transceiver—

The GIFT-Group has developed the specification for low-speed CAN transceiver

GLARE Glass-fibre reinforced aluminium

Abbreviations