© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This training course provides an overview of Message Frames.

Slides:



Advertisements
Similar presentations
Contents Overview Data Information Frame Format Protocol
Advertisements

Introduction to CAN.
Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
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,
The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
William Stallings Data and Computer Communications 7th Edition
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Slide 1 Industrial Automation - Customer View - Training PhW - CANopen_en 02/ 2002 CANopen QUIZ CANopen QUIZ.
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Control Area Network (CAN) Bus. 2 Overview  CAN is an important embedded protocol  Primarily automotive, but used in many other places  CAN specifies:
Chapter 6 Errors, Error Detection, and Error Control.
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.
The OSI Reference Model
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
Host Data Layer 7 Application Interacts with software requiring network communications; identifies partners, resources and synchronization Layer 6 Presentation.
Dave Mills CANbus: A brief introduction Incorporating: The Fujitsu status Dave Mills Queen Mary, University of London.
ECE358: Computer Networks Spring 2012
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
SERIAL BUS COMMUNICATION PROTOCOLS
The University of New Hampshire InterOperability Laboratory Serial ATA (SATA) Protocol Chapter 10 – Transport Layer.
1 Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
Controller Area Network Wilmer Arellano, Summer 2007
ECE 371 Controller Area Network (CAN) Overview. Controller Area Network The development of CAN began when more and more electronic devices were implemented.
Ethernet. Ethernet Goals Simplicity Low Cost Compatibility Address flexibility Fairness –All nodes have equal access to the network High speed Stability.
© 2008, Renesas Technology America, Inc. All Rights Reserved The RCAN-ET peripheral and the CAN API SH2 & SH2A MCUs V 1.2 Mar 2010.
Ethernet Two nodes transmit at the same time
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose This training course provides an introduction to Controller.
ECGR 6185 Advanced Embedded Systems Controller Area Network University Of North Carolina Charlotte Bipin Suryadevara.
Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
IEEE Wireless LAN Standard. Medium Access Control-CSMA/CA IEEE defines two MAC sublayers Distributed coordination function (DCF) Point coordination.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
CSC 311 Chapter Eight FLOW CONTROL TECHNIQUES. CSC 311 Chapter Eight How do we manage the large amount of data on the network? How do we react to a damaged.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
Cyclic Redundancy Check (CRC).  An error detection mechanism in which a special number is appended to a block of data in order to detect any changes.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
Multiple Access.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
CAN Controller Area Network Wilmer Arellano, Summer 2007.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
An Introduction to CAN CAN Basics 2 Renesas Interactive
Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
1 Copyright © 2014 Tata Consultancy Services Limited Controller Area Network (CAN) By Renukacharya A. Thakare.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Controller Area Network
CAN ( Controller Area Network )
National Institute of Science & Technology TECHNICAL SEMINAR PRESENTATION Presented by TRUPTI RANJAN BEHERA Roll no: EI Under the Guidance of.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
Data Link Layer What does it do?
CS 457 – Lecture 6 Ethernet Spring 2012.
Data Link Layer: Data Link Control
Data Communication Networks
Lecture 5- Data Link Layer
Controller Area Networks (CAN)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Chapter 6 Multiple Radio Access.
Presentation transcript:

© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This training course provides an overview of Message Frames and hardware issues of the Controller Area Network (CAN) technology used to build networked, multiprocessor embedded systems.  Objectives Discover the types of Message Frames in CAN bus traffic and the purpose of each. Learn the details of a CAN Data Frame. Understand hardware issues of implementing CAN networks.  Content 23 pages 3 questions  Learning Time 30 minutes

© 2009, Renesas Technology America, Inc., All Rights Reserved 2 Controller Area Network What is CAN?  Two-wire, bidirectional serial-bus communication method  Economical solution for high-integrity networking in real-time embedded- control applications  Standardized internationally - CAN 2.0A: ISO11519 (low speed) - CAN 2.0B: ISO11898 (high speed)  Widely used: >>100,000,000 nodes/year  Key features - High reliability (essentially error free, even in noisy environments) - Low wiring cost and node-connection cost - Readily scalable - Off-the-shelf tools - Supported by many chips - Knowledge base growing

© 2009, Renesas Technology America, Inc., All Rights Reserved 33 Types of Message Frames  Data Frame - Carries the actual data (payload)  Error Frame - Six consecutive dominant bits, sent anytime an error is detected by the hardware at any node  Overload Frame - Requests a delay on the bus  Interframe Space - Provides minimum spacing between data and remote frames; allows error frames to have levels of priority  Remote Frame - Requests transmission of a Data Frame; carries no payload

© 2009, Renesas Technology America, Inc., All Rights Reserved 4 Data Frames: Two Types Data Field Control Field End of Frame ACK Field CRC Field Extended Frame (CAN 2.0B) Start of Frame Arbitration Field Standard Frame (CAN 1.0 and 2.0A)

© 2009, Renesas Technology America, Inc., All Rights Reserved 6 Start of Frame Indicated by single dominant bit occurring when bus is idle Start of Frame All nodes synchronize timing to leading edge

© 2009, Renesas Technology America, Inc., All Rights Reserved 7 Arbitration Field: IDs  Standard ID: CAN 2.0A and CAN 2.0B - Gives CAN 2.0B backward compatibility with CAN 2.0A - 11 bits allow up to 2032 unique IDs  Extended ID: CAN 2.0B only (optional) - 29 bits allow over 500 million unique IDs - Extended ID with same 11-bit higher-order field has lower priority than Standard ID  RTR bit following the ID is dominant for a Data Frame, recessive for a Remote Frame Standard ID (11 bits) Standard ID (High-order field, 11 bits) [Additional ID space] (Low-order field, 18 bits) Extended ID (29 bits, CAN 2.0B) Arbitration Field RTR ID0 ID10 12 bits 32 bits SRR ID18ID28 IDE ID17 ID0RTR

© 2009, Renesas Technology America, Inc., All Rights Reserved 8 Keeping Traffic Flowing  CAN Arbitration Protocol: CSMA/CD-CR - Carrier Sense — Nodes wait for period without bus activity before sending message - Multiple Access — Every node has an equal opportunity to transmit message - Collision Detection — Collision occurs if two nodes attempt to transmit at same time - Collision Resolution — Non-destructive bitwise arbitration keeps messages intact; sends highest-priority message without delay; and subsequently allows retransmissions of lower-priority messages

© 2009, Renesas Technology America, Inc., All Rights Reserved 9 Keeping Traffic Flowing Uses Dominant and Recessive bits - IDs with dominant bits get priority - Nodes attempting to send lower-priority messages try to transmit in each successive cycle, succeeding when they finally attain priority

© 2009, Renesas Technology America, Inc., All Rights Reserved 10 Control Field DLC 0 DLC 1 DLC 2 DLC 3 Data Length Code Number of Data Bytes Control Field IDE RB0 DCL3 DCL0 Data Length Code (4 bits) Data Length Code (DLC) tells how much information the Data Field contains  2 bits of Control field are reserved  4 bits give DLC (# of bytes in Data Field)

© 2009, Renesas Technology America, Inc., All Rights Reserved 11 Data Field  Content: Payload of Data Frame  Length: 0 to 8 bytes  MSB is transmitted first Data Field Payload of Data Frame (0, 1, 2, 3, 4, 5, 6, 7 or 8 bytes)

© 2009, Renesas Technology America, Inc., All Rights Reserved 12 CRC Field  15-bit Cyclic Redundancy Check (CRC) value followed by a recessive delimiter  CRC polynomial: x 15 +x 14 +x 10 +x 8 +x 7 +x 4 +x 3 +1  Generated by transmitter node’s hardware; verified in each receiver node’s hardware  If receiver-generated CRC matches transmitted CRC, receiver puts a dominant bit in ACK slot  If no match, receiver sends ‘NO’ vote AFTER upcoming ACK delimiter CRC Field Del CRC Code 15 bits

© 2009, Renesas Technology America, Inc., All Rights Reserved 13 ACK Field  ACK Slot + ACK Delimiter  All receivers that receive valid messages report successful reception by placing a dominant bit in the ACK slot*  Receivers that do not get a valid message (indicated by CRC mismatch) vote ‘NO’ by placing an error flag after the delimiter ACK Field ACK Del * Because every node acknowledges messages, the round-trip propagation delay is the primary distance limitation of CAN.

© 2009, Renesas Technology America, Inc., All Rights Reserved 14 End of Frame  Delimits the end of a Data Frame  Consists of seven recessive bits for Data Frame (also for a Remote Frame)  Provides a short break in communication flow before the next frame, allowing time for Error Frames, etc. End of Frame 7 bits

© 2009, Renesas Technology America, Inc., All Rights Reserved 16 Types of Errors Five types of errors, detected locally: 1. Bit error Received bit at sender not equal to transmitted bit 2. Bit-stuffing violation More than five consecutive bits with same polarity 3. CRC error Checksum violation 4. Form error Bit pulse distorted; invalid bit at predetermined points in message frame 5. ACK error No dominant bit in ACK slot, so sender must retransmit Message Frame

© 2009, Renesas Technology America, Inc., All Rights Reserved 17 Node Hardware Operating States Depending on error detection, hardware is in:  Error Active State — Normal operating state; messages can be transmitter and received.  Error Passive State — Despite frequent transmit and receive problems, messages still can be transmitter and received.  Bus Off State — Serious problems transmitting messages; no messages can be transmitted or received until hardware is reset. This prevents a faulty node from causing a bus failure. Summary of CAN Error Process 1. Error detected by node 2. Error frame immediately transmitted 3. Message cancelled at all nodes 4. Status of hardware at nodes updated 5. Message re-transmitted

© 2009, Renesas Technology America, Inc., All Rights Reserved 18 Implementing CAN Systems Needed:  Firmware  CAN controller  CAN transceivers  A physical media 10kbps6km 125kbps kbps kbps100 1Mbps40 Maximum bit rate* Bus length (meters) * CAN 2.0B

© 2009, Renesas Technology America, Inc., All Rights Reserved 19 CAN Hardware Designs  Two main CAN controller implementation strategies: CAN controller  BasicCAN  FullCAN  Key differences between strategies:  How decision is made on whether or not a message is of interest to a receiving node  How remote frames are answered  How messages are buffered  Implementation determines amount of processing load put on host microcontroller

© 2009, Renesas Technology America, Inc., All Rights Reserved 20 Features of BasicCAN Networks Keep oldest message; newer messages will be lost Overrun Philosophy Remote frames are answered by the application Remote Frame Handling Every CAN message can be received Normally two receive buffers in FIFO structure Global message filtering: Filter cannot be set up to pass only the interesting messages; final filtering must be done by the application Receive Application fills complete Tx register, including ID, RTR, data length, and data; every ID can be transmitted Transmit

© 2009, Renesas Technology America, Inc., All Rights Reserved 21 Features of FullCAN Networks Keep newest message; older messages with the same ID will be lost Overrun Philosophy Remote frames are answered automatically by the controller Remote Frame Handling Only messages with the IDs defined in receive mailboxes can be received No double-buffering for mailboxes Full acceptance filtering; only exact message IDs are let through Receive Transmit mailboxes initialized once Only data bytes written before transmission Transmit

© 2009, Renesas Technology America, Inc., All Rights Reserved 23 Types of CAN Message Frames Data Frame Details Bus Errors Implementation Strategies: BasicCAN vs. FullCAN Course Summary