CAN ( Controller Area Network )

Slides:



Advertisements
Similar presentations
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Advertisements

Contents Overview Data Information Frame Format Protocol
Introduction to CAN.
Course Introduction Purpose
CAN © CiA Node 2 Node 3 Node 4 Node n Node 1 Ld Ld = Drop Length Lt Lt = Trunk Length ISO Topology.
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.
MotoHawk Training CAN Controller Area Network.
Control Area Network (CAN) Bus. 2 Overview  CAN is an important embedded protocol  Primarily automotive, but used in many other places  CAN specifies:
Intro to Controller Area Networks (CAN) Part 2 of 2, E. Zivi, April 1, 2015 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a.
D Channel Data Link Protocol Link access procedure on the D channel - LAPD.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
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.
CAN PROTOCOL Characterization Presentation
CS335 Networking & Network Administration Tuesday, April 13, 2010.
12.1 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
 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.
Introduction to Media Access Control Protocols Yerang Hur and Jiaxiang Zhou System Design Research Lab. Dept. of Computer and Information Science.
SERIAL BUS COMMUNICATION PROTOCOLS
Caleb Walter. iPhone style charger Malware channel Exploit Vehicle CAN network Create Covert Channel at Public Charging Stations Custom Arduino CAN EVSE.
January 9, 2008BAE In-Vehicle Networking Lecture 1 Introduction to CAN (Controller Area Network) BAE 5030 – 363 Spring 2009 Instructors: Marvin.
University of Tehran 1 Interface Design Vehicle Busses Omid Fatemi.
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.
Tecnologie Informatiche ed Elettroniche per le Produzioni Animali (corso TIE) CORSO LAUREA MAGISTRALE IN SCIENZE E TECNOLOGIE DELLA PRODUZIONE ANIMALE.
© 2008, Renesas Technology America, Inc. All Rights Reserved The RCAN-ET peripheral and the CAN API SH2 & SH2A MCUs V 1.2 Mar 2010.
In-Vehicle Networking for Heavy Duty Systems Review of CAN / SAE J1939/ ISO BAE 5030 Fall 2001 Instructor: Marvin Stone BAE 5030 Fall 2001 Instructor:
HCS12 Technical Training Module 12- MSCAN, Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product.
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
© 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.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
Bridging. Bridge Functions To extend size of LANs either geographically or in terms number of users. − Protocols that include collisions can be performed.
14-Oct-15Computer Networks1 Reliable Transmission.
Giuseppe Bianchi Layer 2 Framing HDLC (High-level Data Linl Control)
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This training course provides an overview of Message Frames.
 D Embedded Systems Page1 C166-Core Port 5 Port 3 CPU Dual Port RAM 2 KByte Interrupt Controller Watchdog Peripheral Data External Instr./Data.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose This module provides an overview of sophisticated peripheral.
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.
CAN Controller Area Network Wilmer Arellano, Summer 2007.
1 Lecture Controller Area Networks Dr. Tony Grift
An Introduction to CAN CAN Basics 2 Renesas Interactive
1 Copyright © 2014 Tata Consultancy Services Limited Controller Area Network (CAN) By Renukacharya A. Thakare.
DSSS PHY packet format Synchronization SFD (Start Frame Delimiter)
+ Lecture#2: Ethernet Asma ALOsaimi. + Objectives In this chapter, you will learn to: Describe the operation of the Ethernet sublayers. Identify the major.
Data and Computer Communications Data Link Control Protocols.
Data Link Layer.
Exercises on Data Link Layer.
Controller Area Network
National Institute of Science & Technology TECHNICAL SEMINAR PRESENTATION Presented by TRUPTI RANJAN BEHERA Roll no: EI Under the Guidance of.
CAN Controller Area Network 29BIT ID
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
CAN CANopen.
Controller Area Network (CAN Bus)
Проширења CAN Flexible Datarates
CAN-Protocol Fundamentals V
شبکه محلی کنترلر Controller Area Network (CAN)
Controller Area Networks (CAN)
Basics of Embedded Systems IAX0230 ARM Cortex-M4: CAN Bus
Computer Interfacing and Protocols
Presentation transcript:

CAN ( Controller Area Network ) RTLAB 김병철 08/03/20

개요 CAN 이란? AT91SAM7 의 CAN

CAN 이란? BOSCH 에서 자동차용 전자제어 장치들 간의 실시 간 통신을 위해 개발 ( Ex : ABS, 엔진관리, 변속관 리 ) CSMA/CD+AMP (carrier-sense multiple-access protocol with collision detection and arbitration on message priority) Simple 2-wire differential bus Bit rates up to 1Mbit/s 3종류의 CAN 버전 Four Frame Types Five Error Types Fault Confinement

CAN 계층 구조

CAN 노드 구조

CAN 적용 사례 6->7 : 2개의 Bus로 어떻게 데이터 통신을 하는가?

Bus Condition 뒤로 The Inverted Logic of a CAN Bus CANH와 CANL의 차가 0.5V 보다 작으면 Recessive ‘1’ 0.9V 보다 크면 Dominant ‘0’ 두개의 Bus값을 검사하여 다르면 “0” 같으면 “1” 뒤로

Bus Condition Bus에 대해 Dominant가 Recessive보다 우선순위가 높다!

CSMA/CD with AMP CSMA/CD with AMP (arbitration on message priority)

CAN Bit Coding & Bit Stuffing NRZ Bit Coding Stuff Bits are inserted after 5 consecutive bits of the same level for synchronization

CAN Bit Timing Configuration 뒤로

CAN Frame Formats CAN Versions Standard CAN ( V2.0A ) : 11-Bit Identifier Extended CAN ( V2.0B ) : 29-Bit Identifier Identifier = Priority

CAN Frame Formats 1Mbps의 속도로 data가 전송된다면 Standard의 경우 130us, Extended의 경우 154us의 시간이 소요된다.     1       start bit +  11     Identifier bit +  1       SRR bit +  1       IDE bit +  18     Identifier bit +  1       RTR bits +  6       Control bits +  64     Data bits +  15     CRC bits +  23     (maximum) Stuff bits +  1       CRC delimiter +  1       ACK slot +  1       ACK delimiter +  7       EOF bits +  3       IFS bits ------------------------------ =  154    bits     1       start bit +  11     Identifier bit +  1       RTR bits +  6       Control bits +  64     Data bits +  15     CRC bits +  19     (maximum) Stuff bits +  1       CRC delimiter +  1       ACK slot +  1       ACK delimiter +  7       EOF bits +  3       IFS bits ------------------------------ =  130    bits Standard Extended

Relation between BitRate and Bus Length

CAN Frame Formats Four Frame Types Data Frame (RTR=0) Remote Frame (RTR=1 and no data field) Error Frame (after violation frame format) Overload Frame (Not really used)

Error Detection Error Types CRC error Bit-stuffing error Bit error Form Error Acknowledgment error

Fault Confinement ERRA bit is set in the CAN_SR Register ERRP bit is set in the CAN_SR Register

AT91SAM7의 CAN CAN 2.0A and CAN 2.0B Bit rates up to 1Mbit/s 8 Mailboxes Also called channels or buffers The CPU reads or writes data via the CAN controller mailboxes Each mailbox has an ID Several mailboxes can be configured with the same ID Each can be Receive or Transmit one 16-bit Time Stamp

CAN Block Diagram

Mailbox Receive Mailbox Transmit Mailbox Mailbox with the lowest number is serviced first Mailbox Object Type Receive Receive with overwrite Consumer Transmit Mailbox Mailbox with the highest priority is serviced first Same priority -> mailbox with lowest number first Transmit Producer

Message Acceptance Procedure MIDx : Mailbox ID register MAMx : Acceptance Mask register

Message Acceptance Procedure

Receive Mailbox

Receive with Overwrite Mailbox

Chaining Receive Mailboxes All mailboxes are configured with same ID The mailbox with the largest number is configured in receive with overwrite mode (others are configured in receive mode)

Transmitting Messages

Producer/Consumer model

Producer / Consumer Handling

CAN Controller Timing Modes Timestamping Modes The value of the internal timer is captured at each Start Of Frame or each End Of Frame

CAN Controller Timing Modes Time Triggered Mode

CAN Controller Timing Modes Time Triggered Mode