34
C.Anudeep (200601020) A.Ajay (200601205) Team - G

C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

C.Anudeep (200601020)A.Ajay (200601205)

Team - G

Page 2: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Introduction to CAN

How CAN works

How Arbitration works on CAN bus

Frame Format

Time Synchronization and Errors

CAN Controller Chips

CAN Application Layers

References

Page 3: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 4: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Serial Network Technology for Embedded Solutions.

Originally designed by Bosch Gmbh for automotive industry

Network technology established among micro-controllers

Well suited for high speed/real time applications.

Replaces expensive Dual-port RAM technology

CAN chips manufactured by Motorola, Philips, Intel, Infineon, and more

600 million CAN nodes used in 2007

Page 5: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

High-integrity serial data communications bus for real-time applications

Designed for max. performance & reliability

Operates at data rates up to 1 Mbit/sec

Uses short messages – 8 bytes per message

Excellent error detection and fault confinement capabilities

ISO 11898 International standard

Page 6: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

1983 Start of Bosch internal project to develop in-vehiclenetwork

1986 Official introduction of the CAN protocol1987 First CAN controller chips by Intel & Philips1991 Bosch publishes CAN specification 2.01992 CAN in Automation (CiA) established1992 CAN Application Layer (CAL) protocol by CiA1992 First automobiles equipped with CAN (Mercedes Benz)1993 ISO 11898 standard published1994 First International CAN Conference (iCC)1994 Allen Bradley introduces DeviceNet1995 ISO 11898 amendment (extended frame format)1995 CANopen protocol introduced2000 Development of time-triggered CAN

Page 7: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 8: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

CAN is used wherever two or more microprocessor units need to communicate with each other.

• Passenger Cars (multiple separate CAN networks)

• Trucks & Buses, Construction Vehicles, Agricultural Vehicles

• Semiconductor Industry (Wafer Handlers, etc.)

• Robotics, Motion Control Applications

• Passenger/Cargo Trains (Brake Control, Wagon Communication)

• Aircrafts (AC, Seat Adjustment)

• Building Technologies (Light & Door Control Systems, Sensors, etc.)

• Medical Equipment (X-Ray, CAT scanners, etc.)

• Household Utilities (Coffee Machine, Washer, etc.)

Page 9: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

• Multi-Master Bus Access

• Message Broadcasting

• Message Priority (No Node IDs)

• Limited Data Length (0…8 bytes)

• 1 Mbit/sec Data Rate

• Excellent Error Detection & Fault Confinement

Page 10: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Physical and Data Link Layer implemented in Silicon

SW Development Engineer is not involved with writing protocol features

Low Cost Implementation

Worldwide acceptance (ISO 11898 Standard)

Page 11: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Data messages transmitted from any node on a CAN bus do not contain addresses of either the transmitting node, or of any intended receiving node

Bit encoding

CAN uses Non Return to Zero (NRZ) encoding (with bit-stuffing) for data communication on a differential two wire bus. The use of NRZ encoding ensures compact messages with a minimum number of transitions and high resilience to external disturbance.

Page 12: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Main Rules of Bus Arbitration

• Bit wise arbitration across the arbitration field.

• Dominant Bus Level = 0

• Recessive Bus Level = 1

• Uses Carrier Sense, Multiple Access with Collision Detection (CSMA/CD)

Page 13: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 14: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 15: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 16: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 17: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 18: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 19: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How
Page 20: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Both formats, Standard and Extended, may co-exist on the same CAN bus.

The distinction between both formats is managed by “Identifier Extension Bit (IDE) “

Page 21: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

•Node A transmits a message

•Nodes B,C and D receive the message

•Nodes B and D accept the message, Node C declines

Page 22: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

•Node A sends a remote frame (request)

•Node B,C and D receive message

•Node D accepts, Nodes B,C declines the request

Page 23: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

•Node D sends requested message

•Nodes A,B,C receive the message

•Nodes A,B accept the requested message, Node C declines

Page 24: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Bit Monitoring

Partitioning of CAN Bit Time into Four Segments

Sync_Seg: Signal edge is expected here. Any deviation

will affect Phase Buffer lengths.

Prop_Seg: Compensates for signal propagation times

within the network.

Phase_Seg1/2: Compensate for signal edge phase

errors by adjusting their length.

Page 25: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Phase Errors

Positive Phase Error

if the receiving bit starts after Sync_Seg then it’s a Positive Phase Error

Negative Phase Error

if the receiving bit starts before Sync_Seg then it’s a Negative Phase Error

Compensation of Phase Errors

Compensation of Positive Phase Error - Phase_Seg1 time increases

Compensation of Negative Phase Error - Phase_Seg2 time decreases

Page 26: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Bit Monitoring

every transmitter automatically monitors and compares the actual bit level on the bus with the level that it transmitted.

Stuff Error

More than 5 Bits of same polarity outside of “bit-stuffed” segment

CRC Error

The 16-bit CRC contains the checksum of the preceding application data for error detection with a 15-bit checksum and 1-bit delimiter.

Page 27: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Acknowledgement Error

The ACK field is two bits long and consists of the acknowledge

bit and an acknowledge delimiter bit.

Form Error

Violation of fixed format Bit fields. If a dominant bit is detected, an error is generated. The bits checked are the SOF, EOF,

ACK delimiter, and the CRC delimiter bits.

Error Probability

In conjunction with all the error checking mechanisms, error probability is 10 to the power -11.

Page 28: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Guarantees proper network operation even in cases where malfunctioning nodes produce continuous error condition

CAN error detection can pinpoint to “perpetrator”

Distinction between temporary and permanent node failures

Identification and removal (self-retirement) of malfunctioning nodes from the bus

Page 29: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

CAN Node Error States

Page 30: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Transmit Error A transmitting node sends a faulty message

ALL receiving nodes in the network respond with an error frame

Through “majority vote” the transmitting node is being flagged as the “perpetrator”

Receive Error A transmitting node send a perfectly good message

Only ONE node in the network responds with an error frame

Through “majority vote” the error reporting node is being flagged as the “perpetrator”

Page 31: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

Basic CAN One receive, one transmit message FIFO buffer

Low cost solution

Requires good CPU performance or low CAN data traffic

Full CAN Several programmable receive and/or transmit message buffers

Most designs also provide Basic CAN features

Allows low CPU performance or high CAN data traffic

Page 32: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

CAN and the OSI Model

The CAN specification (ISO11898) discusses only the Physical and Data-Link layers for a CAN network

The Data-Link Layer

It recognises and understands the format of messages. This layer constructs the messages to be sent to the Physical Layer, and decodes messages received from the Physical Layer .

Many applications of CAN require services that are beyond the basic functionality specified by the Data-Link Layer but which may be implemented at the Application Layer. For example, the transmission of data units longer than eight bytes.

To meet this need several organisations have developed their own Application Layers.

Page 34: C.Anudeep (200601020) A.Ajay (200601205) Team - Gcourses.daiict.ac.in/pluginfile.php/5838/mod_resource/...C.Anudeep (200601020) A.Ajay (200601205) Team - G Introduction to CAN How

THANK YOU