Академический Документы
Профессиональный Документы
Культура Документы
Area Network)
Protocol
Manu Rajeev
Karri
ECE/21/13
CONTENT
S
Before CAN
After CAN
What is CAN?
AController Area Network(CAN bus) is avehicle
busstandard designed to allowmicrocontrollersand
devices to communicate with each other in
applications without ahost computer. CAN is an
extremely robust serial communication protocol.
It is a message based protocol.
Distribution across the CAN network that allows peer
to peer or master to slave type of communications.
CAN History
Bosch originally developed CAN in 1985 to address
automotive network requirements to reduce the cost
and weight of a vehicle harness system.
In the 1990s CAN was standardized by ISO 11898.
Since 1995, many higher level protocols(HLPs) were
developed for and standardized on CAN.
Network Model
Physical Network
CAN Network is made up of a group of nodes.
The smallest working CAN Network contains at least
two active nodes( to allow for a transmitting node
and a receiving node that will ack a transmitted
message)
Various Types of
Nodes
CAN Frames
Data Frame (Standard, Extended)
Remote Frame (Standard, Extended)
Error Frame (Passive, Active)
Overload Frame
Data Frame
Remote Data
Frame
Error Frame
Overload Frame
CSMA/CD-CR
CAN protocol handles bus accesses according to
Carrier Sense Multiple Access/ Collision
Detection- Collision Resolution
Carrier Sense(CS)-Every node must monitor bus for
a period of no activity before sending a message.
Multiple Access(MA)-Once a period of no activity
occurs, every node has an equal opportunity to send
a message
CSMA/CD-CR
Collision Detection(CD)-If 2 nodes transmit at the
same time , a collision occurs
Collision Resolution(CR)- Non destructive bit wise
arbitration.
Messages remain intact even after collision.
All arbitration takes place without corruption or delay
of the highest priority message.
Any message that loses the CAN BUS in arbitration is
automatically retransmitted at next available time.
Synchronization
No clock in bit stream
Receivers synchronize on recessive to dominant
transitions.
Hard synchronization occurs at SOF & resets bit
clock
Resynchronization occurs at recessive-to-dominant
(1-0) edges and adjusts the bit clock as necessary.
Bit Stuffing
Bit stuffing ensures recessive-to-dominant edges
Stuff bit occurs after 5 like bits in a row
Recessive or dominant
Error Handling
Error handling ensures integrity of messages.
There are five types of errors in CAN
CRC Error
If calculated CRC and received CRC does not match, then CRC
error occurs.
Acknowledge Error
During the transmission of dataor remote frame, in the ACK
flag field the transmitter will put recessive bit and expect
dominant bit from receive pin. If dominant bit is observed then
that is considered as proper transmission. In other case it is
acknowledgement error.
Form Error
Occurs when any Node that detects a dominant in the CRC
Delimiter, ACK Delimiter, EOF Field or Inter-frame Space.
Stuff Error
6 consecutive bits of same polarity gives an error.
Bit Error
Occurs when transmitted and received bits does not match.
CAN in Action
Transmitting a CAN
message
Receiving a CAN
message
Transmitting &
Receiving
Most aspects of transmitting and receiving a CAN
message is handled by the protocol engine in the
CAN module
Transmitting a message typically requires loading the
identifier, DLC and the data, then setting the
Transmit Request bit.
Receiving a message typically requires monitoring
the Receiver buffer Full with polling or using
interrupts to notify user application when a CAN
messages has been received.
CAN Advantages
& Disadvantages
Advantages
High performance
under light loads
Low cost
Reliable
Robust
Disadvantages
Unfair access: Node
with high priority can
hog the network
Starvation for some
particular nodes
Conclusion
Thank you!