0% found this document useful (0 votes)
88 views

2

CAN Papers

Uploaded by

SaiSai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

2

CAN Papers

Uploaded by

SaiSai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

www.ijemr.

net ISSN (ONLINE): 2250-0758, ISSN (PRINT): 2394-6962

Volume-6, Issue-2, March-April 2016


International Journal of Engineering and Management Research
Page Number: 24-27

A VLSI Implementation of a Proposed Modified Controller Area Network


(CAN) Protocol for Car Automation
Nishanth R
Assistant Professor, Department of ECE, CUCEK, Kerala, INDIA

ABSTRACT node B under the supervision of a central bus master. In a


The design, simulation and implementation of a CAN network, many short messages are broadcast to the
CAN protocol controller for the Car automation. A multi- entire network, which allows for data consistency in every
master serial communication protocol. The CAN Controller node of the system. The communication across a CAN bus
designed will function as the interface between the anti-lock starts with the application providing the CAN controller
brake and other nodes of car automation system and the
with the data to be transmitted. The CAN controller
actual CAN bus. The RTL based design is implemented using
Verilog HDL. Simulations are made at each level to verify the provides an interface between the application and the CAN
implementations. A CAN system sends messages using a bus. The function of the CAN controller is to convert the
serial bus network. With every node like anti-lock brake, data provided by the application into a CAN message
Dash-board, Lighting, Airbag connected to every other node frame fit to be transmitted across the bus. A transceiver
in the network, the need for a central controller for the entire receives the serial input stream from the controller and
network is made redundant. CAN being a multi-master converts it into a differential signal. These differential
communication protocol, engine-control anti-lock brake, signals are transmitted physically across the CAN bus.
dash-board, lighting, airbag all nodes in the system is equal to CAN transmits signals on the CAN bus which consists of a
every other node. Any processor can send a message to any
CAN-High and CAN-Low. These 2 buses carry signals of
other processor. Even if some processor fails, the other
systems in the machine will continue to work properly and opposite polarity to overcome noise interruption. CAN
communicate. with each other. Any node on the network that uses a bit arbitration technique in which the priority of
wants to transmit a message waits until the bus is free. Every accessing the bus is determined by the 11-bit identifier.
message has an identifier, and every message is available to Due to the architecture a dominant bit will always override
every other node in the network. The node selects those a recessive bit; the node with a lower identifier will have
messages that are relevant and ignores the rest. higher priority. Every CAN Controller in a network will
receive any message transmitted on the bus. Based on a
Keywords--- CAN, Protocol, Dash board filtering mechanism, the controller decides if the received
information is relevant to the interfacing application and
then proceeds to process the information. The CAN
I. INTRODUCTION controller chip would be interfaced to an application with a
sensor and an actuator. The sensors provide analog signals
The CAN protocol was designed for short for transmission across the CAN network. The analog
messages, no more than eight bytes long. The protocol signals sent by the application’s sensor are received by an
never interrupts an ongoing transmission, but it assigns Analog-to-Digital Converter which performs the
priorities to messages to prevent conflicts and to make sure conversion. The digital output of the ADC is given to the
that urgent messages are delivered first. The CAN protocol microprocessor. The Microprocessor is an individual unit
includes robust error detection and fault confinement which processes the data and decides upon the
mechanisms to make the traffic highly reliable. The transmission of a message through the CAN network. It
robustness of the network is further augmented by the fact also processes any messages received from the CAN
that any faulty node can be removed from the network network [5]. A block diagram of the CAN Controller is
without affecting the rest of the network. Unlike a shown.
traditional network such as USB or Ethernet, CAN does
not send large blocks of data point-to-point from node A to
24 Copyright © 2016. Vandana Publications. All Rights Reserved.
www.ijemr.net ISSN (ONLINE): 2250-0758, ISSN (PRINT): 2394-6962

Fig2: Communication using CAN.

II. METHODOLOGY
A CAN system sends messages using a serial bus
network. With every node connected to every other node
in the network, the need for a central controller for the
entire network is made redundant.
2.1 Architectural overview
The CAN controller designed for this thesis has
been implemented on the lines of a Basic CAN Controller,
with a few modifications to it. The functional block
diagram for the controller is as shown in the following.
Fig1: Block diagram of CAN controller. The various functional blocks in the diagram are described
as follows:
The CAN Protocol Controller receives • Host CPU: This is the interfacing application which
unformatted message from the microprocessor, frames the provides the CAN controller with the data to be
messages as per the protocol specifications and also de- transmitted across the CAN bus and also reads the received
frames the received CAN message frames. The digital messages from the controller
signals transmitted by the protocol controller are converted • Interface: The interface between the host application and
into electrical signals compatible with the CAN differential the CAN controller consists of an 8-bit data bus to transfer
transmission medium by the CAN Transceiver which is the message to the controller’s transmit buffer, an 8-bit
also designed as a separate entity. The integration of these data read bus which reads the messages received from the
individual blocks would constitute the entire CAN controller’s receive buffers and status signals to perform
Controller. The automobile industry developed several the requisite handshaking for these operations
electronic systems to meet the growing demand for greater
safety, comfort, convenience and compliance requirements
for improved pollution control and reduced fuel
consumption. As a result the complexity of these control
systems and the need to exchange data among them
required more and more hard-wired, dedicated signal lines.
This prompted the replacement of the existing mode of
wiring by a network architecture where all the nodes in the
network communicate through a common bus.

25 Copyright © 2016. Vandana Publications. All Rights Reserved.


www.ijemr.net ISSN (ONLINE): 2250-0758, ISSN (PRINT): 2394-6962

signals generated in various blocks to the necessary target


blocks.
• Arbitration Controller: The arbitration controller is
responsible for indicating the arbitration status of the node.
• Synchronizer: This unit performs the bit timing logic
necessary for synchronizing the CAN controller to the bit
stream on the CAN bus. The recessive to dominant
transition edges present on the received bit stream are used
for synchronization and re-synchronization.
• Bit De-stuff Unit: This unit performs the de-stuffing of
the messages received from the CAN network. This unit
also extracts the relevant information from the received
message.
• RX CRC Generator: After reception, this unit computes
the CRC for the message received.
• Cyclic Redundancy Checker: This unit compares the
generated CRC for the received message with the CRC
frame received by the node. An error is generated if the
two CRC values do not match.
• Bit Stuff Monitor: This unit signals a stuff error when six
Fig3: Functional block diagram of the CAN protocol consecutive bits of equal polarity are detected in the
controller received message.
• Form Checker: A form error is generated if any of the
Parameter Registers: The code parameter, mask fixed-form fields in a received CAN message is violated.
parameter and the Re-Synchronous Jump Width (SJW) The fixed form fields include the CRC delimiter, ACK
specified for the CAN node are stored in this register. delimiter and the EOF field.
• WTX Buffers: There are ten transmit buffers. Each buffer • Bit Monitor: A CAN node acting as the transmitter of a
can hold one byte of data. The controller receives the message, samples back the
message to be transmitted from the host CPU and stores bit from the CAN bus after putting out its own bit. If the
the message in the transmit buffer before further message bit transmitted and the bit sampled by the transmitter are
processing takes place. not the same, a bit error is generated.
• Data / Remote Frame Generator: Data / Remote Frame • Acknowledgment Checker: During the transmission of
Generator is responsible for generating the message frame the acknowledgement slot a transmitter transmits a
as specified by the CAN protocol. recessive bit and expects to receive a dominant bit. If the
• Par-Ser Converter: This unit serializes the message to node receives a recessive bit in the acknowledgement slot
facilitate the CRC computation. an ACK error is signaled.
• TX CRC Generator: Before transmission, this unit • Acceptance Checker: This unit checks the incoming
computes the CRC for the message to be transmitted. The message ID and determines if the received frame is valid.
generated CRC frame is appended to the message being • Receive Buffer: There are two 10 byte buffers that are
transmitted before bit-stuffing is performed. used alternatively to store the messages received from the
• Bit Stuff Unit: This unit performs bit-stuffing as CAN bus. This enables the host CPU to process a message
specified by the CAN protocol, making the message while another message is being received by the controller.
suitable for transmission across the CAN network. 2.2. Arbitration
• Overload / Error Frame Generator: Generates Error or CAN is a protocol for short messages. Each
Overload frame whenever error or overload condition transmission can carry 0 - 8 bytes of data. It uses
occurs. Error containment measures are also taken care of CSMA/CD+AMP (Carrier Sense Multiple
to ensure the accuracy of the controller’s performance and Access/Collision Detection with Arbitration on Message
its further participation in the CAN network. Priority). Thus the protocol is message oriented and each
• Serialized Frame Transmitter: This unit transmits the message has a specific priority according to which it gains
data/ remote frame or the error / overload frame or a access to the bus in case of simultaneous transmission. An
dominant bit during the acknowledgment slot based on the ongoing transmission is never interrupted. During the bus
prevalent conditions. idle state, any node can access the CAN bus. In the event
• Message Processor: This is the central unit which of multiple accesses, the priority is decided by a method
provides all the control and the status signals to the various called “Non-Destructive Bit-wise Arbitration”.
other blocks in the controller. This unit routes the different Nondestructive means that the winner of the arbitration -
the message with the higher priority - must continue

26 Copyright © 2016. Vandana Publications. All Rights Reserved.


www.ijemr.net ISSN (ONLINE): 2250-0758, ISSN (PRINT): 2394-6962

transmitting the message without having to restart the REFERENCES


message transmission from the beginning
[1] CAN Specification Version 2.0, Robert Bosch GmbH,
III. CONCLUSION Stuttgart, Germany, 1991.
[2] Wolfhard Lawrenz, “CAN System Engineering: From
A simulation model for verifying the CAN Theory to Practical Applications”, Springer-Verlag, 1997,
controller has been designed with four CAN nodes ISBN 0–387–94939-9.
instantiated on a network. The four CAN nodes have been [3] Daniel Mannisto, Mark Dawson, “An Overview of
instantiated as can_0, can_1, can_2 and can_3. These Controller Area Network (CAN) Technology”, mBus,
nodes can be used for the Anti-lock brakes, lighting, Dash- 2003.
board, Airbagand various other nodes. In this simulation [4] Steve Corrigan, “Introduction to the Controller Area
model, each CAN controller is capable of transmitting and Network (CAN) – Texas Instruments Application Report”,
receiving messages. This means that any of CAN SLOA101, 2002.
controllers can be a master. The clock frequency used in [5] Karthik Ranganathan, “RTL System Design of CAN
this system is 8MHz and the CAN transmission rate is 2.0A Controller, Master’s Thesis, Texas Tech University”,
1Mbit/s. The top module provides the nodes with the Lubbock, TX, 2005.
messages to be transmitted across the CAN network. The [6] ISO. International Standard ISO 11898: “Road
test bench module also provides the oscillator clock of 8 Vehicles – Interchange of digital information – Controller
Mega Hz and the data at the CAN system clock of 1 Mega Area Network (CAN) for high speed communication”, ISO
Hz for the CAN nodes. Apart from the above functions the 11898:1993[E], 1993.
top module Wire-AND’s the bit stuffed output streams of [7] Karl Henrik Johansson, Martin Torngren, Lars Nielsen,
the CAN nodes. “Vehicle Applications of Controller Area Network”, 2005.
The CAN message communication consist of [8] Stuart Robb, “CAN Bit Timing Requirements –
error-free transmission and reception of data frames, Motorola Semiconductor Application Note”, AN1798,
remote frames and also error frames. The functioning of 1999.
the CAN network has been demonstrated by verifying each [9] Lars-Berno Fredriksson, “Controller Area Networks
of the above cases. Since the verification model is written and the protocol CAN for machine control systems”,
in Verilog HDL, the CAN controller can be tested at any Kvaser AB, P.O. Box 4076, S-511 04 Kinnahult, Sweden.
time during the design phase. [10] Peter Bagschik, “An Introduction to CAN”, I+ME
ACTIA GmbH, ISO 7498, 1998.
[11] Blagomir Donchev, Marin Hristov, “Implementation
of CAN Controller With FPGA Structures”, 7th
International Conference, CADSM, 2003.
[12] Florian Hartwich, Armin Bassemir, “The
Configuration of the CAN Bit Timing, 6th International
CAN Conference”, Robert Bosch GmbH, Abt. K8/EIS
Tübinger Straße 123, 72762 Reutlingen.
[13] http://www.can-cia.org/can/protocol, 2004, CAN
Protocol, Home page of the organization CAN In
Automation (CiA).
[14] Jose Rufino, “An Overview of Controller Area
Network”, Instituto Superior Técnico - Universidade
Fig4: Simulation of data frame Técnica de Lisboa, Avenida Rovisco Pais – 1096 Lisboa
Codex – Portugal.

Fig5: Simulation of bit stuffing technique


27 Copyright © 2016. Vandana Publications. All Rights Reserved.

You might also like