CAN Controller Area Network 29BIT ID

Slides:



Advertisements
Similar presentations
Contents Overview Data Information Frame Format Protocol
Advertisements

Introduction to CAN.
Introduction to CANBUS
CAN © CiA Node 2 Node 3 Node 4 Node n Node 1 Ld Ld = Drop Length Lt Lt = Trunk Length ISO Topology.
Jonathan Meed Alexander Basil. What is CAN (Controller Area Network) CAN is a multi-master serial bus Developed by Bosch for automotive applications in.
Control Area Network CAN Developed by Bosch in 1983 as an automotive protocol, it was adopted by the Society of Automotive Engineers (SAE) in As.
University of Calgary – CPSC 441.  Ethernet, defined under IEEE 802.3, is one of today's most widely used data communications standards  It finds its.
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,
Ethernet Risanuri Hidayat. Ethernet The term Ethernet refers to the family of local-area network (LAN) products covered by the IEEE standard. Three.
Protocol Layer Bottom-up view of the USB protocol Bottom-up view of the USB protocol –Byte/Bit Ordering –SYNC Field –Packet Field Formats PID Field PID.
Universal Serial Bus Grant Heileman. The History of USB In 1994 a collaborative effort to design a standard for peripheral devices was made between Compaq,
CompTIA Network+ Chapter 2
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:
D Channel Data Link Protocol Link access procedure on the D channel - LAPD.
Control Area Network CAN Developed by Bosch in 1983 as an automotive protocol, it was adopted by the Society of Automotive Engineers (SAE) in As.
Chapter Two Networking Standards and the OSI Model.
Host Data Layer 7 Application Interacts with software requiring network communications; identifies partners, resources and synchronization Layer 6 Presentation.
CAN PROTOCOL Characterization Presentation
DeviceNet and SDS Presented by : Ramesh Vishwanathan Biosystems and Agl. Engineering.
 What is a Controller Area Network?  History of CAN  CAN communication protocol  Physical layer  ISO  CiA  CANopen  DeviceNet  Applying.
Slide 1 / 20 Industrial Automation - Custumer View - Services PhW - Modbus_en 06/ 2002 Modbus training.
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.
The University of New Hampshire InterOperability Laboratory Serial ATA (SATA) Protocol Chapter 10 – Transport Layer.
PROFIBUS PA Date 09/19/00, Page 1 PROFIBUS PA s  PROFIBUS PA = PROFIBUS for Process Automation PA is based on the DP and DP Extended protocol DP Master.
January 9, 2008BAE In-Vehicle Networking Lecture 2 CAN Physical Layers ISO 11898, ISO Part 2, J ,12,13 Physical Layers BAE
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.
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:
Jiří Novák, CTU FEE in Prague, Dept. of Measurement Industrial Distributed Systems Technology overview Technology overview Important features Important.
Advanced Embedded Systems Design Lecture 13 RISC-CISC BAE Fall 2004 Instructor: Marvin Stone Biosystems and Agricultural Engineering Oklahoma.
1 Layer 2: Concepts Honolulu Community College Cisco Academy Training Center Semester 1 Version
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
Ethernet Term Paper Introduced by: Almarshood, Yosef Bahaitham, Ahmed Alrashudi, Ahmed.
Local Area Networks: Ethernet. IEEE Background Institution of Electrical and Electronic Engineering (IEEE) A professional non-profit organization Project.
1 Data Link Layer Lecture 22 Imran Ahmed University of Management & Technology.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This training course provides an overview of Message Frames.
In-Vehicle Networking
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.
Section 6 - Slide 1 / 27 P&T - GPS - Training PhW - 06_TECH_Modbus_en 06/ 2004 Modbus training Part 1 :Reference documents - WEB sites Part 2 :Definitions.
CAN Controller Area Network Wilmer Arellano, Summer 2007.
1 Lecture Controller Area Networks Dr. Tony Grift
ISO 11783/SAE J1939 Network Layer Lecture 6 Network Layer ISO Part 4, J BAE Spring 2009 Instructor: Marvin Stone Biosystems and.
SpaceWire Remote Memory Access Protocol
© N. Ganesan, Ph.D., All rights reserved. Chapter Formatting of Data for Transmission.
An Introduction to CAN CAN Basics 2 Renesas Interactive
1 Copyright © Monash University ECS5365 Lecture 2 ISDN Protocols and Standards Philip Branch Centre for Telecommunications and Information Engineering.
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.
Data Communications Data Link Layer.
IPv4 over IP CS Soohong Daniel Park Syam Madanapalli.
CAN CANopen.
High level Data Link Layer Protocol - HDLC
HDLC and PPP.
Controller Area Network (CAN Bus)
Data Networking via LANs Packets and Frames
Lec 5 Layers Computer Networks Al-Mustansiryah University
Controller Area Network (CAN) Training
Проширења CAN Flexible Datarates
شبکه محلی کنترلر Controller Area Network (CAN)
Protocol layering and data
Controller Area Networks (CAN)
Protocol layering and data
Presentation transcript:

CAN Controller Area Network 29BIT ID Overview and Application Timothy E. Jackson

CAN Frame

CAN Frame IDENTIFIER DLC DATA FIELD Identifier = 29 bits + MAC DLC = Data Length Code 4 bits Indicates number of data bytes Data Field = 0 to 7 bytes Depends on the DLC value

Max frame length with bit stuffing = 127 bits CAN Frame CRC delimiter 1 bit Standard Format, 2.0A Max frame length with bit stuffing = 127 bits Arbitration Field Control Field Data Field 12 bits 6 bits 0 to 64 bits SOF Identifier 11bits RTR IDE r0 DLC 4bits CRC 15bits ACK Field 2bits EOF 7bits Bit Stuffing No Bit Stuffing SOF = Start Of Frame RTR = Remote Transmission Request IDE = Identifier Extension Bit DLC = Data Length Code CRC = Cyclic Redundancy Check ACK = Acknowledgement EOF = End Of Frame

Max frame length with bit stuffing = 150 bits CAN Frame CRC delimiter 1 bit Extended Format, 2.0B Max frame length with bit stuffing = 150 bits Arbitration Field Control Field Data Field 32 bits 6 bits 0 to 64 bits SOF Identifier 11bits SRR IDE Identifier Ext. 18bits RTR r1 r2 DLC 4bits CRC 15bits ACK Field 2bits EOF 7bits Bit Stuffing No Bit Stuffing SOF = Start Of Frame SRR = Substitute Remote Request IDE = Identifier Extension Bit RTR = Remote Transmission Request DLC = Data Length Code CRC = Cyclic Redundancy Check ACK = Acknowledgement EOF = End Of Frame

CAN Frame 32 bits 6 bits 0 to 64 bits Arbitration Field Control Field CRC delimiter 1 bit Arbitration Field Control Field Data Field 32 bits 6 bits 0 to 64 bits SOF Identifier 11bits SRR IDE Identifier Ext. 18bits RTR r1 r2 DLC 4bits CRC 15bits ACK Field 2bits EOF 7bits

CAN Frame Message Structure 29 Bit Identifier DLC DATA FIELD 29 bits 0 to 8 bytes PRI PGN SA PRI= Priority 3 bits PGN = Parameter Group Number, 18 bits SA = Source Address, 8 bits

How do I start using CAN right now? SAE J1939 Defined by the automotive industry Standards defined for the Layers 1,2,3,4, and 7

ISO Layers according to SAE J1939 Application Layer SAE J1939/71 SAE J1939/73 Layer 7 Presentation Layer Layer 6 Session Layer Layer 5 Transport Layer Layer 4 SAE J1939/21 Network Layer SAE J1939/31 Layer 3 Data Link Layer Layer 2 SAE J1939/21 Physical Layer SAE J1939/11 SAE J1939/12 Layer 1

ISO Layers Used In EAMCS Application Layer Layer 7 Data Link Layer Layer 2 Physical Layer Layer 1

Physical Layer SAE J1939/11 – High Speed Bus Connection Differential signal transmission Shielded twisted pair bus lines and ground 250k bits/sec 30 nodes max. Bus length = 40m max. or 131 ft. max. SAE J1939/12 – Variant Bus Connection Bus constructed using active termination For bus load = 1 (Using 29bit ID and 8 data bytes per frame, approx. 135bits/message) At a bitrate of 250kbps 1850 messages per second

Node A (EAMCS) Node B (UQM Inverter) 120Ω 120Ω

Example MSCAN Timing

Cont. Example MSCAN Timing 16Tq = SYNC_SEG + PropagationDelaySeg + TimeSeg1 + TimeSeg2 SYNC_SEG = 1Tq PropagationDelaySeg = 2Tq (Determined by bus characteristics) Pick, TimeSeg2 = 5Tq TimeSeg1 = 8Tq This gives a SJW range 0…3 so, I picked 2 Once values are determined, then apply to MSCAN registers

Data Link Layer SAE J1939/21 29 Bit ID PRI PGN SA 28…26 25 24 23…16 15…8 7…0 r DP PF DA/GE PRI= Priority 3 bits PGN = Parameter Group Number, 18 bits r = Reserved Bit, always 0 or dominant DP = Data Page PF = PDU format, (Protocol Data Unit) DA = Destination Address GE = Group Extension SA = Source Address, 8 bits

Example: EAMCS Message sent to UQM Inverter 29 Bit ID PRI r DP PDU Dest. Addr Source Addr 28…26 25 24 23…16 15…8 7…0 0x06 0x04 0xEF 0x02 0x01 Priority Defined by SAE Reserved for future use Defined by SAE PDU Defined by SAE DA Defined by User SA Defined by User

Application Layer SAE J1939/71 Defines the bytes in the data field

SAE HANDBOOK DATA

Example: Parameter Group Definition Electric Drive State Transmission Repetition Rate: 100ms Data Length: 8 bytes Data Page: 0 PDU format: 239 PDU specific: DA Default Priority: 4 Byte Definitions 1 Command 0x10 2,3 Actual Speed 4 Torque 5 Voltage 6 Current 7,8 System Error

Cont. Example: Parameter Group Definition Byte Definitions 1 Command 0x10 2,3 Actual Speed 4 Torque 5 Voltage 6 Current 7,8 System Error Definitions Command Actual Speed Torque Voltage Current System Error Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8 Data Field

Cont. Example: Parameter Group Decoding Using MSCAN (The Easy Way) Define a struct typedef struct{ INT8U command; INT16U actual_speed; INT8U torque; INT8U voltage; INT8U current; INT16U system_error; }ELEC_DRIVE_STATE; Command Actual Speed (MSB) Actual Speed (LSB) Torque Voltage Current System Error (MSB) System Error (LSB) CANRXFG[4] D a t F i e l d Create an Instance ELEC_DRIVE_STATE elec_drive_data; Take advantage of Struct copying routines elec_drive_data = *(ELEC_DRIVE_STATE*)(CANRXFG + 4); Now access the data fields using the corresponding struct member outhexw(&elec_drive_data.actual_speed); /* Print the 16bit hex value */

References Motorola Documentation MSCAN Block Guide V02.14, S12MSCANV2.pdf Bosch Documentation CAN Specification Version 2.0, can2spec.pdf Reference Texts Konrad Etschberger,Controller Area Network. Weingarten, Germany: IXXAT Automation GmbH, 2001 1997 SAE Handbook, Volume 2 Parts and Components. Warrendale, PA: Society of Automotive Engineers, 1997