ECGR 6185 Advanced Embedded Systems Controller Area Network University Of North Carolina Charlotte Bipin Suryadevara.

Slides:



Advertisements
Similar presentations
Nick Feamster CS 4251 Computer Networking II Spring 2008
Advertisements

Contents Overview Data Information Frame Format Protocol
HIGH-LEVEL DATA LINK CONTROL (HDLC) HDLC was defined by ISO for use on both point-to-point and multipoint data links. It supports full-duplex communication.
Setha Pan-ngum. History of CAN [1] It was created in mid-1980s for automotive applications by Robert Bosch. Design goal was to make automobiles more reliable,
William Stallings Data and Computer Communications 7th Edition
Slide 1 Industrial Automation - Customer View - Training PhW - CANopen_en 02/ 2002 CANopen QUIZ CANopen QUIZ.
Control Area Network (CAN) Bus. 2 Overview  CAN is an important embedded protocol  Primarily automotive, but used in many other places  CAN specifies:
1 Version 3 Module 8 Ethernet Switching. 2 Version 3 Ethernet Switching Ethernet is a shared media –One node can transmit data at a time More nodes increases.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Controller Area Network: Overview (Updated by: Ki-sung Koo, CprE 458/558.
D Channel Data Link Protocol Link access procedure on the D channel - LAPD.
1 Version 3.0 Module 6 Ethernet Fundamentals. 2 Version 3.0 Why is Ethernet so Successful? In 1973, it could carry data at 3 Mbps Now, it can carry data.
Department of Computer Engineering University of California at Santa Cruz Networking Systems (1) Hai Tao.
1 Version 3 Module 8 Ethernet Switching. 2 Version 3 Ethernet Switching Ethernet is a shared media –One node can transmit data at a time More nodes increases.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
Ethernet: CSMA/CD (Carrier Sense Multiple Access with Collision Detection) Access method: method of controlling how network nodes access communications.
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
Host Data Layer 7 Application Interacts with software requiring network communications; identifies partners, resources and synchronization Layer 6 Presentation.
Review on Networking Technologies Linda Wu (CMPT )
 What is a Controller Area Network?  History of CAN  CAN communication protocol  Physical layer  ISO  CiA  CANopen  DeviceNet  Applying.
EECS 373 Controller Area Networks Samuel Haberl Russell Kuczwara Senyuan Zhong.
SERIAL BUS COMMUNICATION PROTOCOLS
MODULE I NETWORKING CONCEPTS.
Chapter Five Network Architecture. Chapter Objectives  Describe the basic and hybrid LAN technologies  Describe a variety of enterprise-wide and WAN.
ECE 371 Controller Area Network (CAN) Overview. Controller Area Network The development of CAN began when more and more electronic devices were implemented.
Jiří Novák, CTU FEE in Prague, Dept. of Measurement Industrial Distributed Systems Technology overview Technology overview Important features Important.
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Copyright CCNA 1 Chapter 5 Ethernet Fundamentals By Your Name.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
CSCI 465 D ata Communications and Networks Lecture 19 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Ethernet Term Paper Introduced by: Almarshood, Yosef Bahaitham, Ahmed Alrashudi, Ahmed.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
CCNA 3 Week 4 Switching Concepts. Copyright © 2005 University of Bolton Introduction Lan design has moved away from using shared media, hubs and repeaters.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This training course provides an overview of Message Frames.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
Sem1 - Module 8 Ethernet Switching. Shared media environments Shared media environment: –Occurs when multiple hosts have access to the same medium. –For.
Section 3 - Slide 1/19 P&T - GPS - Formation PhW - CANopen_lev1_en - 01/2004 History CANopen and the ISO model Physical layer Link layer Application layer.
17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
Enterprise network 8.1:Introduction 8.2:LANs 8.3:Ethernet / IEEE :Token ring 8.5:Bridges.
Prepared by Engr.Jawad Ali BSc(Hons)Computer Systems Engineering University of Engineering and Technology Peshawar.
DATA LINK CONTROL PROTOCOLS. 2 Introduction Data link control layer – often abbreviated simply to data link layer – is concerned with the transfer of.
Controller Area Network (CAN) is a broadcast, differential serial bus standard, originally developed in the 1980s by Intel and Robert Bosch GmbH, for.
IEEE 802.X Standards The Institute of Electrical and Electronics Engineers (IEEE) has developed a series of networking standards to ensure that networking.
SYSTEM ADMINISTRATION Chapter 2 The OSI Model. The OSI Model was designed by the International Standards Organization (ISO) as a structural framework.
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
1 May-2014 Automotive Protocols & Standards. 2 CAN (Controller Area Network)  Overview Controller Area Network is a fast serial bus designed to provide.
An Introduction to CAN CAN Basics 2 Renesas Interactive
1 Copyright © 2014 Tata Consultancy Services Limited Controller Area Network (CAN) By Renukacharya A. Thakare.
1 Copyright © Monash University ECS5365 Lecture 2 ISDN Protocols and Standards Philip Branch Centre for Telecommunications and Information Engineering.
Simple LAN Topologies  Terminators stop signals after they have reached their destination  Signal bounce –Phenomenon in which signals travel endlessly.
Data and Computer Communications Data Link Control Protocols.
Chapter Objectives After completing this chapter you will be able to: Describe in detail the following Local Area Network (LAN) technologies: Ethernet.
COMPUTER NETWORKS Lecture-8 Husnain Sherazi. Review Lecture 7  Shared Communication Channel  Locality of Reference Principle  LAN Topologies – Star.
Controller Area Network
National Institute of Science & Technology TECHNICAL SEMINAR PRESENTATION Presented by TRUPTI RANJAN BEHERA Roll no: EI Under the Guidance of.
Data Communications Data Link Layer.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lecture # 07 Spring-2016.
Media Access Methods MAC Functionality CSMA/CA with ACK
Data Link Layer.
Data link layer (LLC).
CprE 458/558: Real-Time Systems
Data Link Issues Relates to Lab 2.
Protocol Basics.
CS412 Introduction to Computer Networking & Telecommunication
Controller Area Networks (CAN)
Data Link Layer. Position of the data-link layer.
Introduction Communication Modes Transmission Modes
Presentation transcript:

ECGR 6185 Advanced Embedded Systems Controller Area Network University Of North Carolina Charlotte Bipin Suryadevara

Intra-vehicular communication A typical vehicle has a large number of electronic control systems Some of such control systems –Engine timing –Gearbox and carburetor throttle control –Anti-block systems (ABS) –Acceleration skid control (ASC) The growth of automotive electronics is a result of: –Customers wish for better comfort and better safety. –Government requirements for improved emission control –Reduced fuel consumption

How do we connect these control devices? With conventional systems, data is exchanged by means of dedicated signal lines. But this is becoming increasingly difficult and expensive as control functions become ever more complex. In case of complex control systems in particular, the number of connections cannot be increased much further. Solution: Use Fieldbus networks for connecting the control devices

What Fieldbus Networks are currently on the market? some of the Fieldbus technologies currently on the market –RS-232 –RS-485 –CAN ( we will discuss in detail) –ARCNET –IEC –BITBUS (IEEE 1118) –ModBus –HART –Conitel –DF1 –Data Highway [+]

Controller Area Network (CAN) Controller Area Network (CAN) is a fast serial bus that is designed to provide –an efficient, –Reliable and –Very economical link between sensors and actuators. CAN uses a twisted pair cable to communicate at speeds up to 1Mbit/s with up to 40 devices. Originally developed to simplify the wiring in automobiles. CAN fieldbuses are now used in machine and factory automation products as well.

CAN features Any node can access the bus when the bus is quiet Non-destructive bit-wise arbitration to allow 100% use of the bandwidth without loss of data Variable message priority based on 11-bit (or 29 bit) packet identifier Peer-to-peer and multi-cast reception Automatic error detection, signaling and retries Data packets are 8 bytes long

Tradeoff: CAN bus versus point-to-point connections By introducing one single bus as the only means of communication as opposed to the point-to-point network, we traded off the channel access simplicity for the circuit simplicty Since two devices might want to transmit simultaneously, we need to have a MAC protocol to handle the situation. CAN manages MAC issues by using a unique identifier for each of the outgoing messages Identifier of a message represents its priority.

Physical CAN connection

CAN CAN BUS CS1CS2CS3CS4CS5 CAN Station 1CAN Station 5

CAN Protocol - Version 2.0 A(standard)/B(Extended) A: Object, Transfer, and Physical Layers – Object Layer: handles messages - selects transmit/receive messages – Transfer Layer: assures messages adheres to protocol – Physical Layer: sends and receives messages B: Data Link Layer and Physical Layer

Physical Layer Topology - Terminated bus Number of stations - In principle limited to 30 (depends on drivers) Medium - Twisted pair, single wire Range -Signaling speed and propagation speed dependent: 40m at 1Mbit/s -Drop length limited to 30 cm Signaling and bit encoding -10 kbit/s to 1 Mbit/s, NRZ

Physical Layer Synchronization - Uses signal edges (implies bit stuffing with NRZ) - After Five consecutive ones, a zero is inserted - After Five consecutive zeros, a one is inserted - This rules includes a possible stuffing bit inserted before Signals - Recessive: logical “1” - Dominant: logical “0” - When two stations compete on a bit by bit basis, the station that emits dominant bit imposes this level on the bus

Medium Access Control Frame

Extended Addressing

Addressing Single 11 or 29 bit identifier per frame –If used to identify a node Source(data) or Destination(request) of the message –Normally used to identify the payload –A lower value gives higher value in contention,

Error Detection Several means Bit error – When what is one the bus is different from what was emitted Except when a recessive bit was emitted during arbitration or ack slot Cyclic Redundancy Check (CRC) Frame check (the frame structure is checked) ACK errors (absence of a dominant bit during the ack slot) Monitoring (each node which transmits also observes the bus level and thus detects differences between the bit sent and the bit received).

Error Detection Bit stuffing (checking adherence to the stuffing rule.) A frame is valid for – A transmitter if there is no error until the end of EOF – A receiver if there is no error until the next to last bit of EOF

Behavior in case of error In case of stuff, bit, form or acknowledge errors – An error flag is started at the next bit In case of CRC error – An error frame is send after the ack delimiter Fault confinement – Each time an reception error occurs, REC is incremented – Each time a frame is received correctly, REC is decremented – Same for the emission errors with TEC –The values of TEC and REC may trigger mode changes

Connection Modes To enforce fault confinement, nodes may be in one of three modes Error active – Normally takes part to the communication and may send an active error flag (six dominant consecutive bits) when an error has been detected. Error passive – Takes part in communication but must not send an active error flag. Instead, it shall send a passive error flag (six recessive consecutive bits) –Some restrictions (silence between two tx).

Connection Modes Bus off –Cannot send or receive any frame. – A node is in this state when it is switched of the bus due to a request from a fault confinement entity. May exit from this state only by a user command

Error Frame Two fields: Error flag and Error delimiter Error flag –Active: Six dominant bits –Passive: Six recessive bits – As all nodes monitor the bus and the flag violates stuffing rules, they will send error flags too The error flag will last from 6 to 12 bits

Error Frame Error delimiter (Eight recessive bits) –After sending an error flag, a node shall send recessive bits – As soon as it senses a recessive bit, it sends seven recessive bits

Error Recovery Automatic retransmission –Of all frames that have lost arbitration – Of all frames have been disturbed by errors during transmission

Medium Access Control All messages are sent in broadcast Nodes filter according to their interest All messages are acknowledged including by nodes that are not interested by the message –Acknowledge just means “message well received by all receivers” It does not mean “intended receiver received it”

Medium Access Control Node that does not receive message correctly sends an error bit sequence Node that is too busy may send an overload bit seq. –MA_OVLD.request/indication/confirm –Same principle as an error

Logical Link Control Two types of services (connectionless) – Send Data with no ack L_DATA.request, L_DATA.indication, L_DATA.confirm Uses a data frame –Request Data L_REMOTE.request,L_REMOTE.indication,L_REMOTE.confir m Uses a remote frame (same as a data frame but data field is empty) –Flow control using the overload bit sequence

Implicit collision handling in the CAN bus If two messages are simultaneously sent over the CAN bus, the bus takes the “logical AND” of all them Hence, the messages identifiers with the lowest binary number gets the highest priority Every device listens on the channel and backs off as and when it notices a mismatch between the bus’s bit and its identifier’s bit

Implicit collision handling in the CAN bus: example Node B’s message-ID Node A’s message-ID BUS Node B notices a mismatch in bit # 3 on the bus. Therefore, it stops transmitting thereafter Unlike the MAC protocols we learnt, in CAN a collision does not result in wastage of bandwidth. Hence, CAN achieves 100% bandwidth utilization

References

THANKYOU QUESTIONS?????????