Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 436 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
436
Dung lượng
13,27 MB
Nội dung
Multiplexed Networks for Embedded Systems CAN, LIN, Flexray, Safe-by-Wire Dominique Paret Translated by Roderick Riesco, MA Member of the Institute of Translation and Interpreting, UK Multiplexed Networks for Embedded Systems Multiplexed Networks for Embedded Systems CAN, LIN, Flexray, Safe-by-Wire Dominique Paret Translated by Roderick Riesco, MA Member of the Institute of Translation and Interpreting, UK Originally published in the French language by Dunod as ‘‘Dominique Paret: Re´seaux multiplexes pour systeme´s embarque´s CAN, LAN, FlexyRay, Safe-by-Wire’’ Copyright ß Dunod, Paris 2005 Copyright ß 2007 John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England Telephone (þ44) 1243 779777 Email (for orders and customer service enquiries): cs-books@wiley.co.uk Visit our Home Page on www.wiley.com All Rights Reserved No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except under the terms of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London W1T 4LP, UK, without the permission in writing of the Publisher Requests to the Publisher should be addressed to the Permissions Department, John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England, or emailed to permreq@wiley.co.uk, or faxed to (þ44) 1243 770620 Designations used by companies to distinguish their products are often claimed as trademarks All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners The Publisher is not associated with any product or vendor mentioned in this book This publication is designed to provide accurate and authoritative information in regard to the subject matter covered It is sold on the understanding that the Publisher is not engaged in rendering professional services If professional advice or other expert assistance is required, the services of a competent professional should be sought Other Wiley Editorial Offices John Wiley & Sons Inc., 111 River Street, Hoboken, NJ 07030, USA Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA Wiley-VCH Verlag GmbH, Boschstr 12, D-69469 Weinheim, Germany John Wiley & Sons Australia Ltd, 42 McDougall Street, Milton, Queensland 4064, Australia John Wiley & Sons (Asia) Pte Ltd, Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809 John Wiley & Sons Canada Ltd, 6045 Freemont Blvd, Mississauga, ONT, Canada L5R 4J3 Wiley also publishes its books in a variety of electronic formats Some content that appears in print may not be available in electronic books Anniversary Logo Design: Richard J Pacifico British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library ISBN 978-0-470-03416-3 (HB) Typeset in 10/12 pt Times by Thomson Digital Printed and bound in Great Britain by Antony Rowe Ltd, Chippenham, Wiltshire This book is printed on acid-free paper responsibly manufactured from sustainable forestry in which at least two trees are planted for each one used for paper production I dedicate this book to my father, Andre´ Paret, who passed away many years ago, and who, wherever he is now, will surely be smiling wickedly to himself when he finds that X-by-Wire solutions are about to be introduced in the car industry in a few years’ time He was a pioneer in mechanical and electronic systems for civil aviation, and, more than fifty years ago, brought such expressions as ‘fly-by-wire’, ‘level 5, and multiple redundancy’, ‘reliability’, ‘lambda’, etc., into my childhood and teenage years Now the circle is unbroken Life is always beginning again! DOMINIQUE Contents Preface xi Acknowledgements xv Part A CAN: from concept to reality 1 The CAN bus: general 1.1 1.2 1.3 1.4 1.5 1.6 3 12 12 14 19 CAN: its protocol, its properties, its novel features 25 2.1 2.2 2.3 2.4 25 54 71 76 Definitions of the CAN protocol: ‘ISO 11898-1’ Errors: their intrinsic properties, detection and processing The rest of the frame CAN 2.0B The CAN physical layer 3.1 3.2 3.3 3.4 3.5 3.6 Concepts of bus access and arbitration Error processing and management Increase your word power From concept to reality Historical context of CAN Patents, licences and certification Introduction The ‘CAN bit’ Nominal bit time CAN and signal propagation Bit synchronization Network speed 83 83 86 90 94 106 116 Medium, implementation and physical layers in CAN 125 4.1 4.2 4.3 126 131 142 The range of media and the types of coupling to the network High speed CAN, from 125 kbit sÀ1 to Mbit sÀ1: ISO 11898-2 Low speed CAN, from 10 to 125 kbit sÀ1 404 Appendix A Figure A1 Appendix A 405 – organization of special days, seminars and technical conferences such as the very high level international CAN conferences (ICC) (dealing with the protocol, the components, the application layers, real-time CAN, approval, certification, etc.); – promotion events in Europe and for new markets, especially in the United States and the Far East; – periodical publication of newsletters and product guides; at the local level (in many countries) – organization of dedicated information forums, general training and special workshops on particular themes; – a presence in the specialist press, and at trade fairs and exhibitions For further information you can contact the group directly at CAN in Automation Am Weichselgarten 26 DE-91058 Erlangen Tel.: þ49 -9131 -69086-0 fax: þ49-9131-69086-79 E-mail: headquarters@can-cia.org Web site: www.can-cia.org Appendix B Essential References B.1 The ISO/OSI Model ISO 7498 (1984) Information processing systems Open systems interconnection – OSI Basic reference model, International Standard Organization ISO/IEC 9646 – to (1991) Information Technology – Open Systems Interconnection Conformance Testing methodology and framework, Part B.2 CAN Reference Document CAN protocol specifications V 2.0 (A & B) - Robert Bosch (1991 & 1992) B.3 CAN and ISO ISO 11898-1, -2, -3, -4 and -5 (1993 to 2006) Road vehicles – interchange of digital information Controller area network – CAN – ISO standard ISO 11519-1 (1994) Road vehicles – low speed serial data communications Part – general and definitions ISO 11519-2 (1994) Road vehicles – low speed serial data communication Part – low speed controller area network CAN Multiplexed Networks for Embedded Systems: CAN, LIN, Flexray, Safe-by-Wire D Paret ß 2007 John Wiley & Sons, Ltd 408 Appendix B B.4 ‘Industrial’ Application Layers CiA draft specifications (DS .) CAL (CAN application layer) CAN physical layer CAN power management layer CAN application layer for industrial applications – CAL CMS NMT DBT LMT DS DS DS 102 150 201/207 2.0 1.2 1.1 Service specification Protocol specification Data types and encoding rules Service specification Protocol specification Service specification Protocol specification Service specification Protocol specification Application layer naming conventions DS DS DS 202-1 202-2 202-3 DS DS DS DS DS DS DS 203-1 203-2 204-1 204-2 205-1 205-2 207 1994 1996 CANopen Communication profile for industrial systems(EN 50 325 – 4) Framework for programmable devices Device profiles for I/O modules for drives and motion control for human machine interfaces for measur devices and closed-loop control for encoders DS 301 4.0 2003 DS DS 302 401 1.0 1.4 1997 1996 DS DS DS 402 403 404 1.0 1997 1.0 1997 DS 406 1.0 1997 3.0 1.0 1996 1994 1.0 1995 SDS (smart distributed system) specifications Application layer protocol Physical layer specification Interface guidelines specifications Device guidelines specifications Component modeling specification Verification test procedure spec for I/O devices Product selection guide Conformance testing procedure GS 052 GS 052 GS 052 GS 052 GS 052 GS 052 1996 103 104 105 106 107 108 Essential References 409 DeviceNet specifications DeviceNet specification – reference D 9240 – DNDOC Volume 1: Communication Model and Protocol Volume 2: Device Profiles and Object Library Source code example – reference 9240 – DNEXP 2.0 2.0 1997 1997 CAN kingdom CAN kingdom specification Version 3.0 M3S – multiple master multiple slave M3S – multiple master multiple slave specification Version 2.0 1995 B.5 Motor Vehicle Application Layers OSEK/VDX specifications OSEK/VDX operating system OSEK/VDX communication specification OSEK/VDX network management Version 2.0 Version 1.2 Version 2.0 1997 1997 1997 SAE J1939/3 Recommended practice for serial control and communication network (class C) for truck and bus application J1939 General standard document describing the general characteristics of the network, the OSI layer, etc J1939/01 Application document for truck and bus control and communication /02 Application document for agricultural equipment control and communication /11 Physical layer 250 kbit sÀ1, shielded twisted pair /21 CAN 29 bit identifier data link layer /31 Network layer for trucks and buses /4X Transfer layer /5X Session layer /6X Presentation layer /71 Vehicle application layer /72 Virtual terminal application layer /81 J1939 network administration document 1992 ICC (International CAN Conferences) proceedings Most of the documents listed above can be obtained from CiA This independent organization, which has the mission of supporting CAN, also distributes and sells official documents relating to application layers Appendix C Further Reading C.1 Journals, Magazines, Other Documentation CiA Product guide CAN newsletters (published quarterly) C.2 Books in German CAN (controller area network) – Grundlagen, Protokolle, Bausteine, Anwendungen – K Etschberger, E´diteur Hanser CAN – Grundlagen und Praxis – W Lawrentz, E´diteur Hu¨thig C.3 Books in English CAN – W Lawrenz, John Wiley & Sons C.4 Books in French Le bus CAN – Applications – D Paret, Dunod Multiplexed Networks for Embedded Systems: CAN, LIN, Flexray, Safe-by-Wire D Paret ß 2007 John Wiley & Sons, Ltd Appendix D Useful Addresses D.1 ISO In France, ISO standards can be obtained from AFNOR 11, rue Franc¸ois de Pressence´ Saint-Denis Tel: þ33(1) 41 62 80 00 Fax: þ33(1) 49 17 90 00 D.2 CAL and CANopen CiA – CAN in Automation Am Weichselgarten 26 DE-91058 Erlangen Tel: þ 49 9131 69086 Fax: þ 49 9131 69086 79 E-mail: headquarters@can-cia.org Web site: www.can-cia.org ODVA 8222 Wiles Road, suite 287 Coral Springs, FL 33067 United States Tel: þ (1) 954 340 5412 Fax: þ (1) 954 340 5413 Multiplexed Networks for Embedded Systems: CAN, LIN, Flexray, Safe-by-Wire D Paret ß 2007 John Wiley & Sons, Ltd 414 D.3 CAN Kingdom Kvaser AB P.O Box 4076 51 104 Kinnahult Sweden Tel: þ (46) 320 15 287 Fax: þ (46) 320 15 284 D.4 M3S M3S dissemination office TNO Institute of Applied Physics PO box 155 2600 AD Delft The Netherlands Tel: þ (31) 152 69 20 04 Fax: þ (31) 152 69 21 11 Web site: 147 252 133 152/m3s D.5 OSEK Institute of Industrial Information Systems – IIIS University of Karlsruhe Hertzstrasse 16 D - 76187 Karlsruhe Germany Tel: þ (49) 721 608 4521 Fax: þ (49) 721 755 788 MOST Corporation Bannwaldallee 48 D - 76185 Karlsruhe Germany Tel: þ (49) 721 966 50 00 Fax: þ (49) 721 966 50 11 Appendix D Index acceptance ACK slot 48 acknowledgement, positive and negative active error flag 66 airbags 343 arbitration 34 babbling idiot 270 basic cycle 235 BCH codes (shortened) 44 bit CAN 36 rate 31 bit calculation 89 bit rate: gross 116 of bus 31 net 117 bit resynchronization 109 bit stuffing 37 bit time 86 Bluetooth 380, 395 broadcast 33 BSS 352 Bus section separators 352 bus: guardian 239 passive linear 256 C & S 23 CAN - CiA connector 157 CAN 14 conformance testing 22 in Automation 157 CAN 2.0 A and CAN 2.0 B compatibility 81 Cascaded active stars 258 certification 22 CiA 20, 157 configuration: hardware 307 confinement 12 contention Controller area network 15 CSMA/CA CSMA/CD current power line 160 cycle: basic 235 communication 248 operating 234 daisy chain 288, 307 Data frame 33 Data link layer 26 deadlock 318 deterministic 232 development tools 227 DeviceNet 221 differential mode 128 differential pair 128 single parallel 128 twisted 129, 130 dominant 5, 125 dV/dt 172 EEE 802.11x 396 elasticity engine start prevention 377 Multiplexed Networks for Embedded Systems: CAN, LIN, Flexray, Safe-by-Wire D Paret ß 2007 John Wiley & Sons, Ltd 416 error: active 11 confinement 35 phase 110 passive 11 error active 57 error classes 70 error delimiter 68 error detection 63 error frame 66 error passive 57 error recovery 68 event triggered 231 fail-safe 326 fail-safe SBC 314, 317, 326 Failure mode and effect analysis 330 Fault tolerant low speed CAN 144 field: acknowledgement 48 control 41 CRF 44 data 44 payload 250 FireWire 371 Flexible time division multiple access 251 FlexRay 242 FlexRay Consortium 243 FlexRay time hierarchy 262 FMEA 330 frame handler 289 frame: data 33 remote 34 FT LS CAN 144 FTDMA 251 gateway 336, 339 between buses 337 medium-to-medium 165 Generalized interoperable fault tolerant CAN transceiver 23 generating polynomial 45 GIFT 23 global time 240 golden device 150 ground shift 155 GSM 380, 395 Index Hamming distance 44 handler: protocol 181 frame 289 handshake 331 hardware 326 header 249 health bulletin of a network 55 I2C: buffered 359 optical 359 ICT 23 IDB-1394 375 identifier 32 IEEE 1394–1995 372 IEEE 1394 371 igniters 347 immobilizer 377 International transceiver conformance test 23 ISO 11 898-2 131 ISO 11 898-3 144 ISO 11 898-4 233 ISO 11 898-5 139 ISO 15 519 144 ISO 9141 298 ISO/OSI 26 isolation: by optical coupling 158 by transformer 158 K line 298 latency 12 layer: ‘‘Object’’ 28 ‘‘Transfer’’ 28 CAN application 217 limp home function 318, 323 LIN 285 specification package 287 LIN cluster 289 line drivers 181 link: star 257 wire: isolated CAN 158 by current power lines 160 Index point to point 256 load: CPU 206 bus 212 Local interconnect network 285 local regulations 300 macroticks 262 master synchronization 240 Media oriented systems transport 364 medium: two-wire using a differential pair 128 single wire 127 optical 166 microcontrollers with integrated CAN 181 microticks 262 minimum time quantum 90 modulation: ASK 161 FSK 161 MOST 364 multicast 33 Near field communication 397 Network idle time 248 network structure 94 never give up 245 NFC 397 NIT 248 node (station) 29 Nominal bit time 86 NRZ coding 36 One wire CAN 152 Open Systems Interconnection 26 OSEK/VDX 18 overload frame 71 paradigm 248 partial networks 140, 322 passive error flag 67 passive go 385 passive keyless entry 384 payload 249 phase jump 110 physical layer 27 power shuttle 353 RAND 21 417 Reasonable And Non Discriminatory 21 recessive 5, 12, 125 remote control: two-way 383 one-way 384 remote frame 34, 50 repeater 164 resynchronization jump width 110 re-use 334 ring 96 Safe-by-Wire 343 Safe-by-Wire Plus 345 safety restraint 343 sample point 88 SBC 315 scheduling table 289 SDS 225 segment: header 249 phase buffer and 88 propagation 99 synchronization 87 propagation time 88 dynamic 248, 251 static 248, 250 shift: ground 155 single channel 239 single wire CAN 152 slew rate 172 slope adjustment 134 smoothing inductance 174 software 326 squibs 347 star 95 active 258 passive 257 SW CAN 152 symmetrization of the output signals 173 synchronization: bit 106, 107 hardware 108 System basis chip 314 TDMA 242, 251 Telec 100 418 time: latency 120 propagation 96 time division multiple access 242, 251 time master 235 time quantum 90 time slot 239 time triggered protocol 241 time window 234 Tmed 100 topology 94 TPMS: 386 with movement detection 387 without movement detection 387 Tqual_sign 101 trailer 249 Trx 101 Index Tsd 100 TTCAN 231, 232 TTP/C 232, 241 Ttx 101 two channel 239 two channel redundant system 260 TiD 394 tyre identification 394 tyre pressure monitoring systems 386 validity of messages 69 voltage Vsplit 136 watchdog 318 wheel location 390 X-by-Wire 231, 236 [...]... maintain the coherence of parallel processing Multiplexed Networks for Embedded Systems: CAN, LIN, Flexray, Safe- by- Wire D Paret ß 2007 John Wiley & Sons, Ltd 4 Multiplexed Networks for Embedded Systems All stations independently generate messages concerning their respective tasks at random (event-triggered) instants The transmission requests contend with each other for access to the bus, leading to latencies1... New multiplexed bus concepts: LIN, FlexRay, Fail -safe SBC, Safe- by- Wire 7 LIN – Local Interconnect Network 7.1 7.2 7.3 7.4 7.5 Introduction Basic concept of the LIN 2.0 protocol Cost and market Conformity of LIN Examples of components for LIN 2.0 8 Think ‘Bus’, think ‘Fail -safe SBC’, ‘Gateways’ 8.1 8.2 8.3 8.4 8.5 Fail -safe SBCs: their multiple aspects and reasons for using them The strategy and... conformity 166 169 169 5 Components, applications and tools for CAN 179 5.1 5.2 5.3 CAN components Applications Application layers and development tools for CAN 6 Time-triggered protocols – FlexRay 6.1 6.2 6.3 6.4 6.5 Part B Some general remarks Event-triggered and time-triggered aspects TTCAN – Time-triggered communication on CAN Towards high-speed, X -by- Wire and redundant systems FlexRay New multiplexed. .. families of CAN components The CiA group has 300 member companies New set of ISO standards relating to CAN (diagnostics, conformity, etc.) Development phase of time-triggered CAN (TTCAN) networks Explosion of CAN- linked equipment in all motor vehicle and industrial applications Industrial introduction of real-time time-triggered CAN (TTCAN) networks Even the Americans and Japanese use CAN! Annual world... CAL, produced by CAN in Automation, CANopen, produced by CAN in Automation, DeviceNet, produced by Allen Bradley–Rockwell, SDS (smart distributed systems) , produced by Honeywell, CAN Kingdom, produced by Kvaser, and, for motor vehicle applications: OSEK/VDX, produced by OSEK (open systems and interfaces for distributed electronics in car group), J 1939, produced by SAE ... Manufacturers have therefore considered the arrival of the CAN bus from another viewpoint (the very special viewpoint of the performance/cost ratio) and have suddenly decided that this type of bus fully satisfies them It is surprising what can be achieved by taking a fresh look! 14 Multiplexed Networks for Embedded Systems 1.4.3 The CAN offer: a complete solution The strength of the CAN concept, its promotion... requires many years, but forceps can also be useful in helping with the delivery of the little newcomer! 16 Multiplexed Networks for Embedded Systems Finally, in the middle of 1987, the reality took shape in the form of the first functional chips, and in 1991 a first top-range vehicle (German) rolled off the production line, complete with five electronic control units (ECUs) and a CAN bus operating at... market Without ignoring these first applications, therefore, I will try to counteract the general view that CAN is a protocol designed purely for the motor industry, by showing you that it is a highly efficient system for fast local networks 1.5.1 CAN is 20 years old! By way of documentation, the table below shows the main stages of development of CAN during its first 20 years of life 1983 1985 1986... eventually become a safe, reliable means of mobility, a domestic outpost (with audio, video, games, etc.), and an extension of the office! On this topic, I shall describe, in Chapters 9–11, wired and wireless serial links operating inside vehicles, in other words ‘internal’ systems (Safe- by- Wire Plus, 12C, D2B, CPL, MOST, IEEE 1394, etc.) and outside the vehicles, in other words ‘external’ systems (remote... least in Europe, the number of CAN nodes on each vehicle will be approximately 5–10 for the engine system of the vehicle, about 10 for the body part, and finally 15, 20, 25 or more for the passenger compartment, depending on the level of equipment and comfort features fitted to vehicles 18 Multiplexed Networks for Embedded Systems Figure 1.8 The industrial automation market Although the relative volume ... Interpreting, UK Multiplexed Networks for Embedded Systems Multiplexed Networks for Embedded Systems CAN, LIN, Flexray, Safe- by- Wire Dominique Paret Translated by Roderick Riesco, MA Member... aspects TTCAN – Time-triggered communication on CAN Towards high-speed, X -by- Wire and redundant systems FlexRay New multiplexed bus concepts: LIN, FlexRay, Fail -safe SBC, Safe- by- Wire LIN – Local.. .Multiplexed Networks for Embedded Systems CAN, LIN, Flexray, Safe- by- Wire Dominique Paret Translated by Roderick Riesco, MA Member of the Institute of Translation and Interpreting, UK Multiplexed