The Controller Area Network (CAN) Interface

Similar documents
The I2C BUS Interface

The Serial Peripheral Interface

CONTROLLER AREA NETWORK (CAN)

CAN bus and NMEA2000 1

Additional Slides (informative)

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN?

Using the Special Function Registers of the Digital I/O interface of STM32

Introduction to Controller Area Network (CAN)

Workshop on In Vehicle Network using CAN By

Controller area network

Using the Special Function Registers of the Digital I/O interface of STM32

A Framework Of Milk Dairy Automation Using CAN Protocol

J1939-based application profiles

Introduction to L.A.P. 1

Course Introduction. Purpose. Objectives. Content. Learning Time

Using the Digital I/O interface of STMicroelectronics STM32 Microcontrollers

The House Intelligent Switch Control Network based On CAN bus

Operating Systems, Concurrency and Time. real-time communication and CAN. Johan Lukkien

Controller Area Network CAN. overview

CAN Protocol Implementation

Development of a CAN Slave Module with SystemC. Igor Sachs Shang Qihua

ISO INTERNATIONAL STANDARD. Road vehicles Controller area network (CAN) Part 3: Low-speed, fault-tolerant, medium-dependent interface

Digital communication technology for teaching automatic control: the level control case

Sri Vidya College of Engineering and Technology. EC6703 Embedded and Real Time Systems Unit IV Page 1.

Controller Area Network

Ch 7. Network Interface

Using Timers of Microchip PIC18F Microcontrollers

Additional Timer Functionalities. Capture, Compare, PWM

CAN-FD Flexible Data Rate CAN

CANCore-I/II. User Manual. Industrial grade CAN module. Ver.:V3.02 (2016/10/22)

Figure 1. ECU Access to CAN bus

The Analog to Digital Converter (ADC)

How to Hack Your Mini Cooper: Reverse Engineering CAN Messages on Passenger Automobiles

A Half-duplex Synchronous Serial Fieldbus S 2 CAN with Multi-host Structure

CAN in Space workshop

ABSOPOS Series CANopen DS406 V3.1 Operating Manual Configuration and CAN-Bus Coupling

Handling Asynchronous Events in MCUs A Light Keyboard Driver

CAN FD. An Introduction V

Grundlagen der Automatisierungstechnik. 10. Signale und Kommunikation in der Automatisierungstechnik

Space Engineering Standards

Communication Networks for the Next-Generation Vehicles

or between microcontrollers)

A CONTROLLER AREA NETWORK LAYER FOR RECONFIGURABLE EMBEDDED SYSTEMS

(Controller Area Network)

CAN-FD FILTER FOR CLASSICAL CAN DEVICES VIENNA 27 OCTOBER BY KENT LENNARTSSON, KVASER AB

Motors I Automation I Energy I Transmission & Distribution I Coatings. DeviceNet CFW700. User s Manual

TSS463C. VAN Data Link Controller with Serial Interface. Features. Description

A Reliable Gateway for In-vehicle Networks

DEFINITION AND IMPLEMENTATION OF AN ARCHITECTURAL CONCEPT FOR CONFIGURING A CAN NETWORK

CAN Node using HCS12

CAN (Controller Area Network) Physical Layer

Serial Buses in Industrial and Automotive Applications

Simplify CAN and LIN In-vehicle Network Testing

EnOcean Radio Protocol. October 10, 2012 SPECIFICATION V1.0. Subject to modifications EnOcean Radio Protocol V1.0 October 10, :05 PM Page 1/11

DeviceNet Communication Manual

SMS based Home Automation using CAN Protocol

Controller Area Network (CAN)

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

EE445M/EE380L.12, Lecture 10 4/2/2018. EE445M/EE360L.6 Embedded and Real-Time Systems/ Real-Time Operating Systems. Lecture 10

EE445M/EE380L.6, Lecture 10 4/3/2016. EE445M/EE360L.6 Embedded and Real-Time Systems/ Real-Time Operating Systems. Lecture 10

ISO INTERNATIONAL STANDARD

The Cubesat Internal bus: The I2C

Data Link Layer Technologies

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Holger Zeltwanger CAN CAN. protocol and its impacts on CANopen. CiA

DNA/DNR-CAN-503 Controller Area Network Layer. User Manual

Debugging CAN, LIN, and FlexRay Automotive Buses with an Oscilloscope

ECE Senior Project Report. Komatsu Sponsored - ECU Communication and Networking

Summary of MAC protocols

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

CAN FD with Dynamic Multi-PDU-to-Frame Mapping

DeviceNet - CIP on CAN Technology

EE 122: Ethernet and

Implementation of CAN Bus Protocol

User Manual Connection to CAN

Real-Time Communications. LS 12, TU Dortmund

Communication in Automotive Networks Illustrated with an Example of Vehicle Stability Program: Part I - Control Area Network

Link Layer and Ethernet

YASP Yet Another Scalable Protocol

CANopen communication protocol

UNDERSTANDING THE CONTROLLER AREA NETWORK (CAN)

Link Layer and Ethernet

Logic Programming with PROFETA

Ethernet Switches Bridges on Steroids. Ethernet Switches. IEEE Wireless LAN. Ad Hoc Networks

Positioning Controller

in Mainz (Germany) Sponsored by Allen Bradley National Semiconductor Philips Semiconductors Organized by

Using CAN Arbitration for Electrical Layer Testing

CprE 488 Embedded Systems Design. Lecture 4 Interfacing Technologies

DeviceNet CFW500. User s Manual. Phone: Fax: Web: -

Protocols for Multiaccess Networks

Enhanced Error-Recovery CAN Bus System Using Reed-Solomon Codec

Links. Error Detection. Link Layer. Multiple access protocols. Nodes Links Frame. Shared channel Problem: collisions How nodes share a channel

CONTROLLER AREA NETWORK AS THE SECURITY OF THE VEHICLES

AP-COBD Manual V /03

Chances and challenges

Turmgasse Ulm. Tel / Fax 0731 / frenzel + berg electronic. CANopen.

GE FANUC Parts 1. DeviceNet Network Master/Slave August 2002 GFK-1539A. Quick Start Guide. Product Description. Specifications. Preinstallation Check

Low Response-Time PC Interface for Real-Time Analysis of Embedded Systems

CANopen CFW100. User s Manual. Phone: Fax: Web: -

An Overview of the Controller Area Network

Transcription:

The Controller Area Network (CAN) Interface ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.S.M. Course

What is CAN? The CAN Controller Area Network is a communication network designed to interconnect MCU-based boards using the computer network paradigm It has been introduced by Bosch to support communication in industrial automation environments It is widely used in robotics, industrial automation and (above all) transportation environments: cars and airplanes

CAN: Physical layer and Arbitration CANH 2 ohm 2 ohm CANL Board Board 2 Board n From the physical point of view, CAN uses a twisted-pair bus terminated, on both sides, by 2 Ω resistors Devices are attached to the bus by means of two signals called CANH (CAN high) and CANL (CAN low) All devices are peers and roles (e.g. master or slaves) do not exist Any device may decide to start to transmit in any moment, so an arbitration policy must be employed

CAN: Bus Arbitration Data is transmitted serially, one bit at time The maximum speed is defined by the standard as Mbps Transmitted bits are:, called recessive bit, called dominant bit Arbitration: When two devices start trasmitting simultaneously, the device that is sending a dominant bit wins! The output circuit of the CAN interface has an electronics able to promote dominant bits Each device is able to listen to what it is currently transmitting, so it can stop transmission if a recessive bit is cancelled by a dominant bit, thus avoiding collisions

CAN: Data Packet A CAN Packet is made of three main parts: Payload, 8 bytes, application-dependent CAN-ID, bits, used to identify the data and its priority Control bits, various bits for signalling The CAN-ID It is a tag that identifies the data that is being transmitted Addressing and transmission exploits the CAN-ID according to a publisher-subscriber paradigm A node (publisher) sends its data using a certain CAN-ID; the packet is initially broadcasted to all other nodes 2 Each node interested in that CAN-ID (subscriber) captures the data packet and forwards it to the upper layers (software)

The Publisher-Subscriber Mechanism NODE A NODE B x3a x3a x3f5 NODE C x3f5 ID = x3f5 ID = x3a NODE D A CAN node interested in a certain packet ID, subscribes to it The subscription means to program its local interface to catch that ID When a node sends a packet with that ID, the interface of all nodes receive it, but those not programmed for catching ignores the packet The interfaces programmed for catching process the packet and forward it to the software

CAN Packet SOF ID RTR IDE DLC Data CRC ACK EOF 4-64 5 7 SOF: Start-of-frame, ( dominant bit) ID: CAN-ID of the packet ( bits) RTR: Remote Transmit Request ( bit) IDE: Extended Identifier ( bit) DLC: Payload Data Length (4 bits) Data: Payload Data ( to 64 bits) CRC: Cyclic-Redundancy-Check Code (5 bits) ACK: Acknowledge ( bit) EOF: End-of-frame (7 recessive bits)

CAN Priority Mechanism The CAN-ID is exploited also to estabilish the priority of a message The priority mechanism exploits dominant bits that have priority over recessive bits 783 Node A 77 Node B Node A stops 783 transmitting! Node A 77 Node B 77 Data on the bus Node B wins!

The Acknowledge Mechanism SOF ID RTR IDE DLC Data CRC ACK EOF 4-64 5 7 When a packet is transmitted, the sender puts a recessive bit in the ACK slot If during transmission, a node interface is catching the packet (since the software made a subscription to that ID), that interface puts a dominant bit in the ACK slot The sender can thus identify if at least one node has received the packet If no node acknowledges the packet, the sender tries to re-transmit it at most 27 times These operations are performed on-the-fly by the hardware, the software is never involved

CAN Transaction Types Simple (Push) Transactions: data is transmitted (periodically) by a node (RTR = ) SOF ID RTR = IDE DLC Data CRC ACK EOF 4-64 5 7

CAN Transaction Types Data Request Transactions: A node requests a data ID by sending a frame with that ID and RTR = The node that can send that ID replies with a data packet with RTR = SOF ID RTR = IDE CRC ACK EOF 4 5 7 SOF ID RTR = IDE DLC Data CRC ACK EOF 4-64 5 7

Format of Data Payload The structure of Payload Data (8 bytes) is application-dependent and free to be defined by the developer However, there are some specifications that define formats for certain kind of applications: CANopen: industrial automation DeviceNet: industrial automation CANaerospace: avionics UAVCAN: avionics and robotics...

The Controller Area Network (CAN) Interface ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.S.M. Course