You are on page 1of 4

CAN bus Wu Dengyao

2016612

10:27

Reference material: 1, Wikipedia https://en.wikipedia.org/wiki/CAN_bus


2, Book CANopen-das standardisierte, eingebettete Netzwerk (Deutsch)
CANopen Chinese)
written by Holger Zeltwanger

As we all know all fieldbus should conformed to OSI 7 layers standard. As you could see in the below picture, CAN only
contains Physical layer and Data Link Layer. And CANopen is based on CAN, and extend it. The five blue contents,
Application ,presentation, Session, Transport, Network are defined by CANopen application layer specification (CiA301,
CiA302)
OSI CAN CANopenCAN
(CANopenCiA301 CiA302

Now we going to start CAN introduction:


CAN
CAN's physical layer is defined by ISO 11898-2, CiA 303-1.
CAN's Data Link is defined by ISO 11898-1.
CANISO 11898-2CiA 303-1
CANISO 11898-1
ISO11898-1

standard11
34

Because physical layer is deep to hardware design, and I really don't know much about it.

Some things relate to physical layer, is the baud rate is negative correlative with the distanceterminal resistor
connector9pin-sub,etc).
, 9pin-sub
We will introduce CAN Data Link:
CAN:
Telegraph is defined as framethere are four frames:

1, Data Frame: a frame containing node data for transmission
1
2, Remote Frame: a frame requesting the transmission of a specific identifier
2
CAN Bus introduction 1

2
3, Error Frame: a frame transmitted by any node detecting an error
3

4, Overload Frame: a frame to inject a delay between data and/or remote frame
4
Data Frame 11 bit CAN ID)

Start of frame

RTR

Data lengthhere is 1byte)


(1

Datahere is 1byte
1

CRC 15 bit +1 bit

Remote Frame:

Remote Frame is short from Data Frame:


1, Without Data
2, RTR bit set to 1

1
2RTR bit 1
Priority:

When transmission there should have some priority judge mechanism.

For example, consider an 11-bit ID CAN network, with two nodes with IDs of 15 (binary representation,
00000001111) and 16 (binary representation, 00000010000). If these two nodes transmit at the same time,
each will first transmit the start bit then transmit the first six zeros of their ID with no
arbitration decision being made.
Function-ID(0000NMTnodeID(15(1111)161000
Nod15(1

CAN Bus introduction 2

AOK

End of frame (Eof

CAN-ID

So similar case when there are two remote frame and data frame which are share the same CAN ID,
then because the RTR bit just after the CAN ID is 1 in Remote frame, 0 in Data frame. So when there
are on the bus in the same time(there is a collision), Data frame has higher priority, then Data frame
remains in the bus.
CAN-IDCANIDRTR1
0

Error frame:

CAN Bus introduction 3

CAN Bus introduction 4