CAN Bus Wu Dengyao
Transcript of CAN Bus Wu Dengyao
-
7/26/2019 CAN Bus Wu Dengyao
1/4
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 resistorconnector9pin-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
CAN bus Wu Dengyao2016612 10:27
CAN Bus introduction 1
https://en.wikipedia.org/wiki/CAN_bushttps://en.wikipedia.org/wiki/CAN_bus -
7/26/2019 CAN Bus Wu Dengyao
2/4
2
3, Error Frame: a frame transmitted by any node detecting an error3
4, Overload Frame: a frame to inject a delay between data and/or remote frame4
Data Frame 11 bit CAN ID)
Start of frame
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 noarbitration decision being made.
Function-ID(0000NMTnodeID(15(1111)161000
Nod15(1
(1 1
RTR Data lengthhere is 1byte) Datahere is 1byte CRC 15 bit +1 bit AOK End of fr
CAN Bus introduction 2
-
7/26/2019 CAN Bus Wu Dengyao
3/4
CAN-ID
CAN-IDCANIDRTR1
0
Error frame:
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 Bus introduction 3
-
7/26/2019 CAN Bus Wu Dengyao
4/4 CAN Bus introduction 4