You are on page 1of 73

BOSCH

CAN Specification
Version 2.0

1991, Robert Bosch GmbH, Postfach 30 02 40, D-70442 Stuttgart

BOSCH

Sep. 1991

CAN Specification 2.0

page 1

Recital
The acceptance and introduction of serial communication to more and more applications has led to requirements that the assignment of message identifiers to communication functions be standardized for certain applications. These applications can be realized with CAN more comfortably, if the address range that originally has been defined by 11 identifier bits is enlarged Therefore a second message format (’extended format’) is introduced that provides a larger address range defined by 29 bits. This will relieve the system designer from compromises with respect to defining well-structured naming schemes. Users of CAN who do not need the identifier range offered by the extended format, can rely on the conventional 11 bit identifier range (’standard format’) further on. In this case they can make use of the CAN implementations that are already available on the market, or of new controllers that implement both formats. In order to distinguish standard and extended format the first reserved bit of the CAN message format, as it is defined in CAN Specification 1.2, is used. This is done in such a way that the message format in CAN Specification 1.2 is equivalent to the standard format and therefore is still valid. Furthermore, the extended format has been defined so that messages in standard format and extended format can coexist within the same network. This CAN Specification consists of two parts, with • • Part A describing the CAN message format as it is defined in CAN Specification 1.2; Part B describing both standard and extended message formats.

In order to be compatible with this CAN Specification 2.0 it is required that a CAN implementation be compatible with either Part A or Part B.

Note CAN implementations that are designed according to part A of this or according to previous CAN Specifications, and CAN implementations that are designed according to part B of this specification can communicate with each other as long as it is not made use of the extended format.

ROBERT BOSCH GmbH, Postfach 30 02 40, D-70442 Stuttgart

PART A

......21 confinement /kn'fainmnt/ : su giam ham............................... han che CODING ......................10 REMOTE FRAME .20 xac nhan.............. Postfach 30 02 40.............23 Error Signalling.........................................................................27 khoan dung..............................................................................................................................18 Definition of TRANSMITTER/RECEIVER ..........3 3..............................................1 3..10 Frame Types ....................................page 3 INTRODUCTION.....................................2 ERROR HANDLING..........................1 6..............15 ERROR FRAME.....5 3..............1 BIT TIMING REQUIREMENTS ...........................................................2 3...................................................1 3.............BOSCH 1 2 3 3....................................................................................22 4 5 6 6........23 Error Detection ...........................................................................31 su sua doi ROBERT BOSCH GmbH..............................17 INTERFRAME SPACING......1...................... 1991 Contents Part A ..........................1................4 BASIC CONCEPTS...............................16 OVERLOAD FRAME............................. xac thuc...................2 Sep...................... lam cho co hieu luc MESSAGE VALIDATION .............................................................................................................................................24 8 9 9...5 MESSAGE TRANSFER ....................................................10 DATA FRAME ......... chiu dung................ nhan nai INCREASING CAN OSCILLATOR TOLERANCE.....................................31 Protocol Modifications ............................................... D-70442 Stuttgart ..............................................................1.........................23 7 FAULT CONFINEMENT....4 3....................1.1........

co. electric windows etc. hau wa . The scope of the object layer includes • • • finding which messages are to be transmitted deciding which messages received by the transfer layer are actually to be used.page 4 The Controller Area Network (CAN) is a serial communications protocol which efficiently supports distributed realtime control with a very high level of security. of course.. has to be the same for all nodes. lamp clusters. D-70442 Stuttgart ket qua. To achieve design transparency and implementation flexibility CAN has been subdivided into different layers.g. Within the transfer layer it is decided whether the bus is free for starting a new transmission or whether a reception is just starting. error checking. The scope of this specification is to define the transfer layer and the consequences of the CAN protocol on the surrounding layers. cho du. error signalling and fault confinement. The scope of the transfer layer mainly is the transfer protocol. lam muc dich sang to regarding: lien • the (CAN-) transfer layer quan den harness: khai thac feature: tinh nang. controlling the framing. however. lieu ROBERT BOSCH GmbH. electrical features and the interpretation of data to be transferred.chang. providing an interface to the application layer related hardware. It is in the nature of the transfer layer that there is no freedom for modifications. Compatibility.e. Within one network the physical layer.he thong day dien BOSCH 1 INTRODUCTION Sep. to replace the wiring harness otherwise required. At the same time it is cost effective to build into vehicle body electronics. much freedom in selecting a physical layer.. Postfach 30 02 40. The scope of the physical layer is the actual transfer of the bits between the different nodes with respect to all electrical properties. • the physical layer diem dac trung The object layer and the transfer layer comprise all services and functions of the data link layer defined by the ISO/OSI model. engine control units. has different aspects regarding e. minh bach cum interpretation: su intention: y dinh. however. sensors. There may be.g. are connected using CAN with bitrates up to 1 Mbit/s. • the (CAN-) object layer giai thich. The intention of this specification is to achieve compatibility between any two CAN implementations. Its domain of application ranges from high speed networks to low cost multiplex wiring. 1991 Introduction pham vi harness: khai thac Part A . In automotive electronics. etc. xac dinh giam loi There is much freedom in defining object handling. Also some general features of the bit timing are regarded as part of the transfer layer.. performing arbitration. i. e. anti-skid-systems.

Transmission Medium ROBERT BOSCH GmbH. Postfach 30 02 40.page 5 do tre. D-70442 Stuttgart .Message and Status Handling Transfer Layer .Message Validation . ngam ngam multicast reception with time synchronization system wide data consistency multimaster error detection and signalling nhat wan.Transfer Rate and Timing Physical Layer . kien dinh automatic retransmission of corrupted messages as soon as the bus is idle again distinction between temporary errors and permanent failures of nodes and autonomous switching off of defect nodes tu quan.Message Framing . tu dieu khien Layered Structure of a CAN Node Application Layer Object Layer .Error Detection and Signalling .BOSCH 2 BASIC CONCEPTS CAN has the following properties • • • • • • • • • prioritization of messages guarantee of latency times configuration flexibility Sep.Signal Level and Bit Representation .Acknowledgment .Message Filtering .Arbitration . 1991 Basic Concepts Part A .Fault Confinement .

Multicast: As a consequence of the concept of MESSAGE FILTERING any number of nodes can receive and simultaneously act upon the same message. error detection and signalling. Data Consistency: Within a CAN network it is guaranteed that a message is simultaneously accepted either by all nodes or by no node. System Flexibility: Nodes can be added to the CAN network without requiring any change in the software or hardware of any node and application layer. The Object Layer is concerned with message filtering as well as status and message handling. station addresses). message framing. This has several important consequences. Messages Information on the bus is sent in fixed format messages of different but limited length (see section 3: Message Transfer).BOSCH • Sep. The IDENTIFIER does not indicate the destination of the message. 1991 Basic Concepts Part A . acknowledgment. • • The scope of this specification is to define the transfer layer and the consequences of the CAN protocol on the surrounding layers. Message Routing: The content of a message is named by an IDENTIFIER. The Transfer Layer represents the kernel of the CAN protocol. The transfer layer is responsible for bit timing and synchronization. Information Routing In CAN systems a CAN node does not make use of any information about the system configuration (e. arbitration. When the bus is free any connected unit may start to transmit a new message. Postfach 30 02 40. It presents messages received to the object layer and accepts messages to be transmitted from the object layer.page 6 The Physical Layer defines how signals are actually transmitted. and fault confinement. but describes the meaning of the data. ROBERT BOSCH GmbH.g. Thus data consistency of a system is achieved by the concepts of multicast and by error handling. so that all nodes in the network are able to decide by MESSAGE FILTERING whether the data is to be acted upon by them or not. D-70442 Stuttgart . Within this specification the physical layer is not defined so as to allow transmission medium and signal level implementations to be optimized for their application.

The unit with the message of higher priority to be transmitted gains bus access. Arbitration Whenever the bus is free.Bit Stuffing .BOSCH Sep. The mechanism of arbitration guarantees that neither information nor time is lost. the bus access conflict is resolved by bitwise arbitration using the IDENTIFIER.page 7 Bit rate The speed of CAN may be different in different systems. The DATA FRAME and the corresponding REMOTE FRAME are named by the same IDENTIFIER. If these levels are equal the unit may continue to send.Message Frame Check ROBERT BOSCH GmbH. When a ’recessive’ level is sent and a ’dominant’ level is monitored (see Bus Values). the DATA FRAME prevails over the REMOTE FRAME. any unit may start to transmit a message. Safety In order to achieve the utmost safety of data transfer.Monitoring (transmitters compare the bit levels to be transmitted with the bit levels detected on the bus) . Priorities The IDENTIFIER defines a static message priority during bus access. Error Detection For detecting errors the following measures have been taken: . However. D-70442 Stuttgart . signalling and self-checking are implemented in every CAN node. During arbitration every transmitter compares the level of the bit transmitted with the level that is monitored on the bus. Postfach 30 02 40. the unit has lost arbitration and must withdraw without sending one more bit. 1991 Basic Concepts Part A . If a DATA FRAME and a REMOTE FRAME with the same IDENTIFIER are initiated at the same time. powerful measures for error detection. Remote Data Request By sending a REMOTE FRAME a node requiring data may request another node to send the corresponding DATA FRAME. Multimaster When the bus is free any unit may start to transmit a message.Cyclic Redundancy Check . If 2 or more units start transmitting messages at the same time. in a given system the bitrate is uniform and fixed.

ROBERT BOSCH GmbH. From this data resynchronization information can be derived. all local errors at transmitters are detected. Error Signalling and Recovery Time Corrupted messages are flagged by any node detecting an error. Fault Confinement CAN nodes are able to distinguish short disturbances from permanent failures. Practically the total number of units will be limited by delay times and/or electrical loads on the bus line. errors of any odd number in a message are detected.7 * 10-11. the resulting bus value will be ’dominant’.BOSCH Sep. single wire (plus ground). the ’dominant’ level would be represented by a logical ’0’ and the ’recessive’ level by a logical ’1’. Defective nodes are switched off. up to 5 randomly distributed errors in a message are detected. Physical states (e. The recovery time from detecting an error until the start of the next message is at most 29 bit times. Connections The CAN serial communication link is a bus to which a number of units may be connected. Single Channel The bus consists of a single channel that carries bits. This number has no theoretical limit. Bus values The bus can have one of two complementary logical values: ’dominant’ or ’recessive’. light) that represent the logical levels are not given in this specification. E. 1991 Basic Concepts Part A . Total residual error probability for undetected corrupted messages: less than message error rate * 4. During simultaneous transmission of ’dominant’ and ’recessive’ bits. electrical voltage. For example.page 8 Performance of Error Detection The error detection mechanisms have the following properties: all global errors are detected. D-70442 Stuttgart .g. Such messages are aborted and will be retransmitted automatically. if there is no further error. burst errors of length less than 15 in a message are detected. Postfach 30 02 40.g. optical fibres. two differential wires. etc. The way in which this channel is implemented is not fixed in this specification. in case of a wired-AND implementation of the bus.

ROBERT BOSCH GmbH.page 9 Acknowledgment All receivers check the consistency of the message being received and will acknowledge a consistent message and flag an inconsistent message. Sleep Mode / Wake-up To reduce the system’s power consumption. The sleep mode is finished with a wake-up by any bus activity or by internal conditions of the system. which are in sleep-mode. although the transfer layer will be waiting for the system’s oscillator to stabilize and it will then wait until it has synchronized itself to the bus activity (by checking for eleven consecutive ’recessive’ bits). On wake-up. before the bus drivers are set to "on-bus" again. 1991 Basic Concepts Part A . lowest possible IDENTIFIER (rrr rrrd rrrr.BOSCH Sep. D-70442 Stuttgart . In order to wake up other nodes of the system. the internal activity is restarted. Postfach 30 02 40. r = ’recessive’ d = ’dominant’) may be used. a special wake-up message with the dedicated. a CAN-device may be set into sleep mode without any internal activity and with disconnected bus drivers.

DATA FIELD.1 DATA FRAME A DATA FRAME is composed of seven different bit fields: START OF FRAME.1. An ERROR FRAME is transmitted by any unit on detecting a bus error. duoc tach ra 3. D-70442 Stuttgart . 1991 Message Transfer Part A . ARBITRATION FIELD.BOSCH 3.page 10 3 MESSAGE TRANSFER 'mænifest/ : bieu hien. CRC FIELD. END OF FRAME. the hien Message transfer is manifested and controlled by four different frame types: A DATA FRAME carries data from a transmitter to the receivers. ACK FIELD.1 Frame Types Sep. Interframe Space DATA FRAME Interframe Space or Overload Frame Start of Frame Arbitration Field Control Field Data Field CRC Field ACK Field End of Frame ROBERT BOSCH GmbH. DATA FRAMEs and REMOTE FRAMEs are separated from preceding frames by an INTERFRAME SPACE. A REMOTE FRAME is transmitted by a bus unit to request the transmission of the DATA FRAME with the same IDENTIFIER. The DATA FIELD can be of length zero. An OVERLOAD FRAME is used to provide for an extra delay between the preceding and the succeeding DATA or REMOTE FRAMEs. Postfach 30 02 40. CONTROL FIELD.

All stations have to synchronize to the leading edge caused by START OF FRAME (see ’HARD SYNCHRONIZATION’) of the station starting transmission first. ARBITRATION FIELD The ARBITRATION FIELD consists of the IDENTIFIER and the RTR-BIT. RTR BIT Remote Transmission Request BIT In DATA FRAMEs the RTR BIT has to be ’dominant’.ID-4) must not be all ’recessive’. The reserved bits have to be sent ’dominant’. It includes the DATA LENGTH CODE and two bits reserved for future expansion. A station is only allowed to start transmission when the bus is idle (see BUS IDLE).page 11 START OF FRAME marks the beginning of DATA FRAMES and REMOTE FRAMEs. This DATA LENGTH CODE is 4 bits wide and is transmitted within the CONTROL FIELD. It consists of a single ’dominant’ bit. These bits are transmitted in the order from ID-10 to ID-0. Within a REMOTE FRAME the RTR BIT has to be ’recessive’. The 7 most significant bits (ID-10 . The least significant bit is ID-0. 1991 Data Frame Part A . DATA LENGTH CODE The number of bytes in the DATA FIELD is indicated by the DATA LENGTH CODE. Postfach 30 02 40. Receivers accept ’dominant’ and ’recessive’ bits in all combinations. Interframe Space Start of Frame ARBITRATION FIELD Control Field RTR Bit Identifier IDENTIFIER The IDENTIFIER’s length is 11 bits.BOSCH Sep. CONTROL FIELD The CONTROL FIELD consists of six bits. ROBERT BOSCH GmbH. D-70442 Stuttgart .

8}. ROBERT BOSCH GmbH.. Postfach 30 02 40..BOSCH Arbitration Field Sep.. 1991 Data Frame Part A .7. D-70442 Stuttgart ..1.page 12 CONTROL FIELD Data Field or CRC Field r1 r0 DLC3 DLC2 DLC1 DLC0 reserved bits Data Length Code Coding of the number of data bytes by the DATA LENGTH CODE abbreviations: d ’dominant’ r ’recessive’ Number of Data Bytes 0 1 2 3 4 5 6 7 8 Data Length Code DLC3 d d d d d d d d r DLC2 d d d d r r r r d DLC1 d d r r d d r r d DLC0 d r d r d r d r d co the chap nhan DATA FRAME: admissible numbers of data bytes: Other values may not be used. {0..

the coefficients of which are given by the destuffed bit stream consisting of START OF FRAME.. for the 15 lowest coefficients. bieu dien CRC_RG = 0.page 13 DATA FIELD The DATA FIELD consists of the data to be transferred within a DATA FRAME. 1991 Data Frame Part A . It can contain from 0 to 8 bytes. Data or Control Field CRC FIELD Ack Field CRC Delimiter CRC Sequence CRC SEQUENCE The frame check sequence is derived from a cyclic redundancy code best suited for frames with bit counts less than 127 bits (BCH Code). DATA FIELD (if present) and.. CRC FIELD contains the CRC SEQUENCE followed by a CRC DELIMITER. CRC_RG(0) = 0. the CRC SEQUENCE is calculated as follows: lay duoc tu. nguon goc bieu thi. // initialize shift register // shift left by // 1 position ROBERT BOSCH GmbH. CONTROL FIELD.BOSCH Sep... which each contain 8 bits which are transferred MSB first. In order to carry out the CRC calculation the polynomial to be divided is defined as the polynomial. given by the destuffed bit sequence from START OF FRAME until the end of the DATA FIELD.. CRC_RG(14:1) = CRC_RG(13:0). REPEAT CRCNXT = NXTBIT EXOR CRC_RG(14). The remainder of this polynomial division is the CRC SEQUENCE transmitted over the bus. This polynomial is divided (the coefficients are calculated modulo-2) by the generator-polynomial: da thuc coefficient: he so3 X15 + X14 + X10 + X8 + X7 + X4 + X3 + 1. by 0. tim thay nguon goc tu.. D-70442 Stuttgart . If NXTBIT denotes the next bit of the bit stream. In order to implement this function. Postfach 30 02 40. a 15 bit shift register CRC_RG(14:0) can be used. ARBITRATION FIELD.

END OF FRAME Each DATA FRAME and REMOTE FRAME is delimited by a flag sequence consisting of seven ’recessive’ bits. ROBERT BOSCH GmbH. ACK DELIMITER). In the ACK FIELD the transmitting station sends two ’recessive’ bits. reports this to the TRANSMITTER by sending a ’dominant’ bit during the ACK SLOT (it sends ’ACK’). CRC_RG contains the CRC sequence. D-70442 Stuttgart . Postfach 30 02 40. 1991 Data Frame Part A . As a consequence. A RECEIVER which has received a valid message correctly.BOSCH Sep. the ACK SLOT is surrounded by two ’recessive’ bits (CRC DELIMITER. CRC Field ACK FIELD End of Frame ACK Delimiter ACK Slot ACK SLOT All stations having received the matching CRC SEQUENCE report this within the ACK SLOT by superscribing the ’recessive’ bit of the TRANSMITTER by a ’dominant’ bit. ACK FIELD The ACK FIELD is two bits long and contains the ACK SLOT and the ACK DELIMITER.page 14 IF CRCNXT THEN CRC_RG(14:0) = CRC_RG(14:0) EXOR (4599hex). ENDIF UNTIL (CRC SEQUENCE starts or there is an ERROR condition) After the transmission / reception of the last bit of the DATA FIELD. =override: ghi de len ACK DELIMITER The ACK DELIMITER is the second bit of the ACK FIELD and has to be a ’recessive’ bit. CRC DELIMITER The CRC SEQUENCE is followed by the CRC DELIMITER which consists of a single ’recessive’ bit.

1. CONTROL FIELD. There is no DATA FIELD. co the chap nhan nguoc lai duoc Inter Frame Space REMOTE FRAME Inter Frame Space or Overload Frame Start of Frame Arbitration Field Control Field CRC Field ACK Field End of Frame The polarity of the RTR bit indicates whether a transmitted frame is a DATA FRAME (RTR bit ’dominant’) or a REMOTE FRAME (RTR bit ’recessive’).. /pou'læriti: tinh phan cuc.BOSCH 3. ACK FIELD. the RTR bit of REMOTE FRAMEs is ’recessive’. Postfach 30 02 40.page 15 A station acting as a RECEIVER for certain data can initiate the transmission of the respective data by its source node by sending a REMOTE FRAME. END OF FRAME. tinh hoan toan doi nguoc nhau ROBERT BOSCH GmbH. independent of the values of the DATA LENGTH CODE which may be signed any value within the admissible range 0. CRC FIELD. Contrary to DATA FRAMEs. ARBITRATION FIELD.8.. The value is the DATA LENGTH CODE of the corresponding DATA FRAME.2 REMOTE FRAME Sep. D-70442 Stuttgart . 1991 Remote Frame Part A . A REMOTE FRAME is composed of six different bit fields: START OF FRAME.

all other stations detect an error condition and on their part start transmission of an ERROR FLAG. 2. Postfach 30 02 40. The ACTIVE ERROR FLAG consists of six consecutive ’dominant’ bits. ERROR FLAG There are 2 forms of an ERROR FLAG: an ACTIVE ERROR FLAG and a PASSIVE ERROR FLAG. 1991 Error Frame Part A . The following second field is the ERROR DELIMITER. So the sequence of ’dominant’ bits which actually can be monitored on the bus results from a superposition of different ERROR FLAGs transmitted by individual stations. The ’error passive’ station waits for six consecutive bits ROBERT BOSCH GmbH. 1. The ERROR FLAG’s form violates the law of bit stuffing (see CODING) applied to all fields from START OF FRAME to CRC DELIMITER or destroys the fixed form ACK FIELD or END OF FRAME field. An ’error passive’ station detecting an error condition tries to signal this by transmission of a PASSIVE ERROR FLAG.BOSCH 3. : vi pham An ’error active’ station detecting an error condition signals this by transmission of an ACTIVE ERROR FLAG.page 16 chong chat. As a consequence. The first field is given by the superposition of ERROR FLAGs contributed from different stations. The total length of this sequence varies between a minimum of six and a maximum of twelve bits.3 ERROR FRAME Sep. D-70442 Stuttgart . an ’error passive’ node may need the bus to be ’bus idle’ for at least 3 bit times (if there is a local error at an ’error passive’ receiver). The PASSIVE ERROR FLAG consists of six consecutive ’recessive’ bits unless it is overwritten by ’dominant’ bits from other nodes. Data Frame ERROR FRAME Interframe Space or Overload Frame Error Flag superposition of Error Flags Error Delimiter In order to terminate an ERROR FRAME correctly.1. chong len nhau The ERROR FRAME consists of two different fields. Therefore the bus should not be loaded to 100%.

whereas OVERLOAD FRAMEs due to OVERLOAD condition 2 start one bit after detecting the ’dominant’ bit.BOSCH Sep. The PASSIVE ERROR FLAG is complete when these 6 equal bits have been detected. tam ngung whereas: trong khi Detection of a ’dominant’ bit during INTERMISSION. End of Frame or Error Delimiter or Overload Delimiter OVERLOAD FRAME Inter Frame Space or Overload Frame Overload Flag superposition of Overload Flags Overload Delimiter At most two OVERLOAD FRAMEs may be generated to delay the next DATA or REMOTE FRAME.4 OVERLOAD FRAME The OVERLOAD FRAME contains the two bit fields OVERLOAD FLAG and OVERLOAD DELIMITER. Postfach 30 02 40. The internal conditions of a receiver. which requires a delay of the next DATA FRAME or REMOTE FRAME. 2. sau do 3. 1991 Overload Frame Part A . duoc cho doi.1. There are two kinds of OVERLOAD conditions. ERROR DELIMITER The ERROR DELIMITER consists of eight ’recessive’ bits. Afterwards it starts transmitting seven more ’recessive’ bits. ROBERT BOSCH GmbH. which both lead to the transmission of an OVERLOAD FLAG: 1. beginning at the start of the PASSIVE ERROR FLAG. D-70442 Stuttgart . After transmission of an ERROR FLAG each station sends ’recessive’ bits and monitors the bus until it detects a ’recessive’ bit. du kien The start of an OVERLOAD FRAME due to OVERLOAD condition 1 is only allowed to be started at the first bit time of an expected INTERMISSION.page 17 of equal polarity.

but interpret the first of these six ’dominant’ bits as START OF FRAME. OVERLOAD FRAME) by a bit field called INTERFRAME SPACE. 1991 Overload Frame Part A .page 18 OVERLOAD FLAG consists of six ’dominant’ bits. The sixth ’dominant’ bit violates the rule of bit stuffing causing an error condition). At this point of time every bus station has finished sending its OVERLOAD FLAG and all stations start transmission of seven more ’recessive’ bits in coincidence.5 INTERFRAME SPACING trung hop ngau nhien DATA FRAMEs and REMOTE FRAMEs are separated from preceding frames whatever type they are (DATA FRAME. After transmission of an OVERLOAD FLAG the station monitors the bus until it detects a transition from a ’dominant’ to a ’recessive’ bit. for ’error passive’ stations. The OVERLOAD DELIMITER is of the same form as the ERROR DELIMITER. 'kntræst/: do tuong phan suspend: dinh chi . INTERFRAME SPACE contains the bit fields INTERMISSION and BUS IDLE and. OVERLOAD FRAMEs and ERROR FRAMEs are not preceded by an INTERFRAME SPACE and multiple OVERLOAD FRAMEs are not separated by an INTERFRAME SPACE. ERROR FRAME. REMOTE FRAME. As a consequence.giai thich BOSCH Sep. which have been TRANSMITTER of the previous message. SUSPEND TRANSMISSION. OVERLOAD DELIMITER consists of eight ’recessive’ bits.1. In contrast. The OVERLOAD FLAG’s form destroys the fixed form of the INTERMISSION field. 3. tri hoan ROBERT BOSCH GmbH. The overall form corresponds to that of the ACTIVE ERROR FLAG. Postfach 30 02 40. all other stations also detect an OVERLOAD condition and on their part start transmission of an OVERLOAD FLAG. (In case that there is a ’dominant’ bit detected during the 3rd bit of INTERMISSION locally at some node. the other nodes will not interpret the OVERLOAD FLAG correctly. D-70442 Stuttgart .

During INTERMISSION no station is allowed to start transmission of a DATA FRAME or REMOTE FRAME. is started in the first bit following INTERMISSION. it sends eight ’recessive’ bits following INTERMISSION. SUSPEND TRANSMISSION After an ’error passive’ station has transmitted a message. 1991 Interframe Space Part A . BUS IDLE The period of BUS IDLE may be of arbitrary length.page 19 For stations which are not ’error passive’ or have been RECEIVER of the previous message: Frame INTERFRAME SPACE Frame Intermission Bus Idle For ’error passive’ stations which have been TRANSMITTER of the previous message: Frame INTERFRAME SPACE Frame Bus Idle Suspend Transmission Intermission INTERMISSION consists of three ’recessive’ bits. The bus is recognized to be free and any station having something to transmit can access the bus.BOSCH Sep. ROBERT BOSCH GmbH. which is pending for transmission during the transmission of another message. A message. The only action to be taken is signalling an OVERLOAD condition. The detection of a ’dominant’ bit on the bus is interpreted as a START OF FRAME. Postfach 30 02 40. D-70442 Stuttgart . If meanwhile a transmission (caused by another station) starts. before starting to transmit a further message or recognizing the bus to be idle. the station will become receiver of this message.

RECEIVER A unit is called “RECEIVER” of a message. Postfach 30 02 40.2 Definition of TRANSMITTER / RECEIVER TRANSMITTER A unit originating a message is called “TRANSMITTER” of that message. 1991 Transmitter / Receiver Part A .BOSCH Sep. if it is not TRANSMITTER of that message and the bus is not idle.page 20 3. The unit stays TRANSMITTER until the bus is idle or the unit loses ARBITRATION. ROBERT BOSCH GmbH. D-70442 Stuttgart .

page 21 4 MESSAGE VALIDATION The point of time at which a message is taken to be valid. ROBERT BOSCH GmbH. Receivers: The message is valid for the receivers. if there is no error until the end of END OF FRAME. retransmission will follow automatically and according to prioritization. Postfach 30 02 40. Transmitter: The message is valid for the transmitter. is different for the transmitter and the receivers of the message. In order to be able to compete for bus access with other messages. D-70442 Stuttgart . If a message is corrupted.BOSCH Sep. if there is no error until the last but one bit of END OF FRAME. 1991 Message Validation Part A . retransmission has to start as soon as the bus is idle.

CONTROL FIELD.page 22 The frame segments START OF FRAME. The ERROR FRAME and the OVERLOAD FRAME are of fixed form as well and not coded by the method of bit stuffing. DATA FIELD and CRC SEQUENCE are coded by the method of bit stuffing. 1991 Coding Part A .BOSCH 5 CODING BIT STREAM CODING Sep. and END OF FRAME) are of fixed form and not stuffed. ROBERT BOSCH GmbH. D-70442 Stuttgart . The bit stream in a message is coded according to the Non-Return-to-Zero (NRZ) method. ACK FIELD. The remaining bit fields of the DATA FRAME or REMOTE FRAME (CRC DELIMITER. ARBITRATION FIELD. Whenever a transmitter detects five consecutive bits of identical value in the bit stream to be transmitted it automatically inserts a complementary bit in the actual transmitted bit stream. This means that during the total bit time the generated bit level is either ’dominant’ or ’recessive’. Postfach 30 02 40.

a STUFF ERROR. A CRC ERROR has to be detected. An exception is the sending of a ’recessive’ bit during the stuffed bit stream of the ARBITRATION FIELD or during the ACK SLOT. if the calculated result is not the same as that received in the CRC sequence. A BIT ERROR has to be detected at that bit time. • • • • 6.BOSCH 6 ERROR HANDLING 6. when the bit value that is monitored is different from the bit value that is sent.1 Error Detection Sep. unless an ERROR FLAG for another condition has already been started. for an ’error passive’ node it is a PASSIVE ERROR FLAG. FORM ERROR A FORM ERROR has to be detected when a fixed-form bit field contains one or more illegal bits. a FORM ERROR or an ACKNOWLEDGMENT ERROR is detected by any station. Postfach 30 02 40. ACKNOWLEDGMENT ERROR An ACKNOWLEDGMENT ERROR has to be detected by a transmitter whenever it does not monitor a ’dominant’ bit during the ACK SLOT. The receivers calculate the CRC in the same way as the transmitter. CRC ERROR The CRC sequence consists of the result of the CRC calculation by the transmitter. STUFF ERROR A STUFF ERROR has to be detected at the bit time of the 6th consecutive equal bit level in a message field that should be coded by the method of bit stuffing. For an ’error active’ node it is an ACTIVE ERROR FLAG. 1991 Error Handling Part A . ROBERT BOSCH GmbH.page 23 There are 5 different error types (which are not mutually exclusive): • BIT ERROR A unit that is sending a bit on the bus also monitors the bus.2 Error Signalling A station detecting an error condition signals this by transmitting an ERROR FLAG. A TRANSMITTER sending a PASSIVE ERROR FLAG and detecting a ’dominant’ bit does not interpret this as a BIT ERROR. Then no BIT ERROR occurs when a ’dominant’ bit is monitored. D-70442 Stuttgart . transmission of an ERROR FLAG starts at the bit following the ACK DELIMITER. Whenever a CRC ERROR is detected. Whenever a BIT ERROR. transmission of an ERROR FLAG is started at the respective station at the next bit.

Also after a transmission. output drivers switched off. When a RECEIVER detects an error.) For fault confinement two counts are implemented in every bus unit: 1) TRANSMIT ERROR COUNT 2) RECEIVE ERROR COUNT These counts are modified according to the following rules: (note that more than one rule may apply during a given message transfer) 1. 1991 Fault Confinement Part A . (E. D-70442 Stuttgart . An ’error passive’ unit must not send an ACTIVE ERROR FLAG. When a TRANSMITTER sends an ERROR FLAG the TRANSMIT ERROR COUNT is increased by 8. Exception 1: If the TRANSMITTER is ’error passive’ and detects an ACKNOWLEDGMENT ROBERT BOSCH GmbH. 2.BOSCH Sep. an ’error passive’ unit will wait before initiating a further transmission. (See SUSPEND TRANSMISSION) A ’bus off’ unit is not allowed to have any influence on the bus. 3. except when the detected error was a BIT ERROR during the sending of an ACTIVE ERROR FLAG or an OVERLOAD FLAG. It takes part in bus communication but when an error has been detected only a PASSIVE ERROR FLAG is sent. the RECEIVE ERROR COUNT will be increased by 1. Postfach 30 02 40. When a RECEIVER detects a ’dominant’ bit as the first bit after sending an ERROR FLAG the RECEIVE ERROR COUNT will be increased by 8.page 24 7 FAULT CONFINEMENT With respect to fault confinement a unit may be in one of three states: • • • ’error active’ ’error passive’ ’bus off’ An ’error active’ unit can normally take part in bus communication and sends an ACTIVE ERROR FLAG when an error has been detected.g.

BOSCH

Sep. 1991

Fault Confinement

Part A - page 25

ERROR because of not detecting a ’dominant’ ACK and does not detect a ’dominant’ bit while sending its PASSIVE ERROR FLAG. Exception 2: If the TRANSMITTER sends an ERROR FLAG because a STUFF ERROR occurred during ARBITRATION whereby the STUFFBIT is located before the RTR bit, and should have been ’recessive’, and has been sent as ’recessive’ but monitored as ’dominant’. In exceptions 1 and 2 the TRANSMIT ERROR COUNT is not changed. 4. If an TRANSMITTER detects a BIT ERROR while sending an ACTIVE ERROR FLAG or an OVERLOAD FLAG the TRANSMIT ERROR COUNT is increased by 8. 5. If an RECEIVER detects a BIT ERROR while sending an ACTIVE ERROR FLAG or an OVERLOAD FLAG the RECEIVE ERROR COUNT is increased by 8. 6. Any node tolerates up to 7 consecutive ’dominant’ bits after sending an ACTIVE ERROR FLAG, PASSIVE ERROR FLAG or OVERLOAD FLAG. After detecting the 14th consecutive ’dominant’ bit (in case of an ACTIVE ERROR FLAG or an OVERLOAD FLAG) or after detecting the 8th consecutive ’dominant’ bit following a PASSIVE ERROR FLAG, and after each sequence of additional eight consecutive ’dominant’ bits every TRANSMITTER increases its TRANSMIT ERROR COUNT by 8 and every RECEIVER increases its RECEIVE ERROR COUNT by 8. 7. After the successful transmission of a message (getting ACK and no error until END OF FRAME is finished) the TRANSMIT ERROR COUNT is decreased by 1 unless it was already 0. 8. After the successful reception of a message (reception without error up to the ACK SLOT and the successful sending of the ACK bit), the RECEIVE ERROR COUNT is decreased by 1, if it was between 1 and 127. If the RECEIVE ERROR COUNT was 0, it stays 0, and if it was greater than 127, then it will be set to a value between 119 and 127. 9. A node is ’error passive’ when the TRANSMIT ERROR COUNT equals or exceeds 128, or when the RECEIVE ERROR COUNT equals or exceeds 128. An error condition letting a node become ’error passive’ causes the node to send an ACTIVE ERROR FLAG.

ROBERT BOSCH GmbH, Postfach 30 02 40, D-70442 Stuttgart

BOSCH

Sep. 1991

Fault Confinement

Part A - page 26

10. A node is ’bus off’ when the TRANSMIT ERROR COUNT is greater than or equal to 256. 11. An ’error passive’ node becomes ’error active’ again when both the TRANSMIT ERROR COUNT and the RECEIVE ERROR COUNT are less than or equal to 127. 12. An node which is ’bus off’ is permitted to become ’error active’ (no longer ’bus off’) with its error counters both set to 0 after 128 occurrence of 11 consecutive ’recessive’ bits have been monitored on the bus. Note: An error count value greater than about 96 indicates a heavily disturbed bus. It may be of advantage to provide means to test for this condition. Note: Start-up / Wake-up: If during start-up only 1 node is online, and if this node transmits some message, it will get no acknowledgment, detect an error and repeat the message. It can become ’error passive’ but not ’bus off’ due to this reason.

ROBERT BOSCH GmbH, Postfach 30 02 40, D-70442 Stuttgart

BOSCH

Sep. 1991

Fault Confinement

Part A - page 27

8 BIT TIMING REQUIREMENTS
NOMINAL BIT RATE The Nominal Bit Rate is the number of bits per second transmitted in the absence of resynchronization by an ideal transmitter. NOMINAL BIT TIME NOMINAL BIT TIME = 1 / NOMINAL BIT RATE The Nominal Bit Time can be thought of as being divided into separate non-overlapping time segments. These segments - SYNCHRONIZATION SEGMENT (SYNC_SEG) - PROPAGATION TIME SEGMENT (PROP_SEG) - PHASE BUFFER SEGMENT1 (PHASE_SEG1) - PHASE BUFFER SEGMENT2 (PHASE_SEG2) form the bit time as shown in figure 1.

NOMINAL BIT TIME
SYNC_SEG PROP_SEG PHASE_SEG1 PHASE_SEG2

Sample Point Fig. 1 Partition of the Bit Time SYNC SEG This part of the bit time is used to synchronize the various nodes on the bus. An edge is expected to lie within this segment. PROP SEG This part of the bit time is used to compensate for the physical delay times within the network.

ROBERT BOSCH GmbH, Postfach 30 02 40, D-70442 Stuttgart

ranging at least from 1 to 32.2. It’s location is at the end of PHASE_SEG1. Starting with the MINIMUM TIME QUANTUM. TIME QUANTUM The TIME QUANTUM is a fixed unit of time derived from the oscillator period. PHASE SEG2 These Phase-Buffer-Segments are used to compensate for edge phase errors. These segments can be lengthened or shortened by resynchronization. D-70442 Stuttgart . SAMPLE POINT The SAMPLE POINT is the point of time at which the bus level is read and interpreted as the value of that respective bit.8 TIME QUANTA long. 1991 Bit Timing Part A .. There exists a programmable prescaler.page 28 It is twice the sum of the signal’s propagation time on the bus line. the input comparator delay. ROBERT BOSCH GmbH. PROP_SEG is programmable to be 1. the TIME QUANTUM can have a length of TIME QUANTUM = m * MINIMUM TIME QUANTUM with m the value of the prescaler. The total number of TIME QUANTA in a bit time has to be programmable at least from 8 to 25. and the output driver delay. PHASE SEG1. Postfach 30 02 40.. PHASE_SEG2 is the maximum of PHASE_SEG1 and the INFORMATION PROCESSING TIME The INFORMATION PROCESSING TIME is less than or equal to 2 TIME QUANTA long.. Length of Time Segments • • • • • SYNC_SEG is 1 TIME QUANTUM long... INFORMATION PROCESSING TIME The INFORMATION PROCESSING TIME is the time segment starting with the SAMPLE POINT reserved for calculation the subsequent bit level.. PHASE_SEG1 is programmable to be 1.BOSCH Sep...2.8 TIME QUANTA long. with integral values.

and if the PHASE ERROR is negative.BOSCH SYNCHRONIZATION Sep. 1991 Bit Timing Part A . PHASE ERROR of an edge The PHASE ERROR of an edge is given by the position of the edge relative to SYNC_SEG. Postfach 30 02 40. Clocking information may be derived from transitions from one bit value to the other. when the magnitude of the PHASE ERROR of the edge which causes the RESYNCHRONIZATION is less than or equal to the programmed value of the RESYNCHRONIZATION JUMP WIDTH. The property that only a fixed maximum number of successive bits have the same value provides the possibility of resynchronizing a bus unit to the bit stream during a frame. • • and if the PHASE ERROR is positive. The sign of PHASE ERROR is defined as follows: • • • e = 0 if the edge lies within SYNC_SEG. Thus HARD SYNCHRONIZATION forces the edge which has caused the HARD SYNCHRONIZATION to lie within the SYNCHRONIZATION SEGMENT of the restarted bit time. The RESYNCHRONIZATION JUMP WIDTH shall be programmable between 1 and min(4. RESYNCHRONIZATION JUMP WIDTH As a result of RESYNCHRONIZATION PHASE_SEG1 may be lengthened or PHASE_SEG2 may be shortened. The maximum length between two transitions which can be used for resynchronization is 29 bit times. measured in TIME QUANTA. then PHASE_SEG2 is shortened by an amount equal to the RESYNCHRONIZATION JUMP WIDTH. ROBERT BOSCH GmbH.page 29 HARD SYNCHRONIZATION After a HARD SYNCHRONIZATION the internal bit time is restarted with SYNC_SEG. then PHASE_SEG1 is lengthened by an amount equal to the RESYNCHRONIZATION JUMP WIDTH. PHASE_SEG1). D-70442 Stuttgart . e > 0 if the edge lies before the SAMPLE POINT. e < 0 if the edge lies after the SAMPLE POINT of the previous bit. When the magnitude of the PHASE ERROR is larger than the RESYNCHRONIZATION JUMP WIDTH. RESYNCHRONIZATION The effect of a RESYNCHRONIZATION is the same as that of a HARD SYNCHRONIZATION. The amount of lengthening or shortening of the PHASE BUFFER SEGMENTs has an upper bound given by the RESYNCHRONIZATION JUMP WIDTH.

All other ’recessive’ to ’dominant’ edges (and optionally ’dominant’ to ’recessive’ edges in case of low bit rates) fulfilling the rules 1 and 2 will be used for RESYNCHRONIZATION with the exception that a node transmitting a dominant bit will not perform a RESYNCHRONIZATION as a result of a ’recessive’ to ’dominant’ edge with a positive PHASE ERROR. Only one SYNCHRONIZATION within one bit time is allowed. 3. D-70442 Stuttgart . HARD SYNCHRONIZATION is performed whenever there is a ’recessive’ to ’dominant’ edge during BUS IDLE. if only ’recessive’ to ’dominant’ edges are used for resynchronization. An edge will be used for SYNCHRONIZATION only if the value detected at the previous SAMPLE POINT (previous read bus value) differs from the bus value immediately after the edge. ROBERT BOSCH GmbH. 2.page 30 SYNCHRONIZATION RULES HARD SYNCHRONIZATION and RESYNCHRONIZATION are the two forms of SYNCHRONIZATION. 1991 Bit Timing Part A .BOSCH Sep. Postfach 30 02 40. 4. They obey the following rules: 1.

5%. [4] Only recessive to dominant edges will be used for synchronization. This modifications allow a maximum oscillator tolerance of 1.1 Protocol Modifications In order to increase the maximum oscillator tolerance from the 0. Postfach 30 02 40. the following rules are still valid. are necessary: [1] If a CAN node samples a dominant bit at the third bit of INTERMISSION.BOSCH Sep. have all to be provided with a quartz oscillator. For the full bus speed range of the CAN protocol. the following modifications. which are upwards compatible to the existing CAN specification. [2] If a CAN node has a message waiting for transmission and it samples a dominant bit at the third bit of INTERMISSION. 1991 Oscillator Tolerance Part A . as long as: [7] CAN controllers with the enhanced and existing protocols. at the next bit. it will interpret this as a START OF FRAME bit. start transmitting its message with the first bit of the IDENTIFIER without first transmitting a START OF FRAME bit and without becoming a receiver.58% and the use of a ceramic resonator at a bus speed of up to 125 Kbits/second. [3] If a CAN node samples a dominant bit at the eighth bit (the last bit) of an ERROR DELIMITER or OVERLOAD DELIMITER. The Error Counters will not be incremented.5% currently possible to 1. used in one and the same network.page 31 9 INCREASING CAN OSCILLATOR TOLERANCE This section describes an upwards compatible modification of the CAN protocol. In agreement with the existing specification. [5] All CAN controllers synchronize on the START OF FRAME bit with a hard synchronization. and. [6] No CAN controller will send a START OF FRAME bit until it has counted three recessive bits of INTERMISSION. The chip with the highest requirement for its oscillator accuracy determines the oscillator accuracy which is required from all the other nodes. as specified in sections 1 to 8. Ceramic resonators can only be used when all the nodes in the network use the enhanced protocol. D-70442 Stuttgart . it will. start transmitting an OVERLOAD FRAME (not an ERROR FRAME). The compatibility of the enhanced and the existing protocol is maintained. 9. with the next bit. then it will interpret this bit as a START OF FRAME bit. still a quartz oscillator is required. ROBERT BOSCH GmbH.

Postfach 30 02 40. 1991 Content Part B . D-70442 Stuttgart .BOSCH Sep.page 32 PART B ROBERT BOSCH GmbH.

..............page 33 INTRODUCTION....55 Definition of TRANSMITTER / RECEIVER ...............64 10 BIT TIMING REQUIREMENTS ........................................................................................................................65 ROBERT BOSCH GmbH.............60 8 FAULT CONFINEMENT..............1 3.................1 7....................................4 3....56 5 MESSAGE VALIDATION ......................3 3.................42 DATA FRAME ........................................................42 REMOTE FRAME .............................................51 INTERFRAME SPACING............ Postfach 30 02 40.......BOSCH 1 2 3 3..............................................................58 7 7................5 3..................................50 OVERLOAD FRAME.......................................................................................... 1991 Introduction Part B ..............................................59 Error Signalling.................................................................. D-70442 Stuttgart .........................................42 Frame Formats...........................................................2 ERROR HANDLING...................................3 3.....................................................................................................2...42 Frame Types .............4 Sep...........................57 6 CODING ..................................1 3............................................................................61 9 OSCILLATOR TOLERANCE.......59 Error Detection .................................................................55 4 MESSAGE FILTERING...53 Conformance with regard to Frame Formats .............................49 ERROR FRAME..........2..................................................36 MESSAGE TRANSFER ..2...................................................................................................................................2.........................................................2..........2 3.....................34 BASIC CONCEPTS....2 3................................................

D-70442 Stuttgart . e. has different aspects regarding e. i. engine control units. sensors. The scope of the LLC sublayer is • • • to provide services for data transfer and for remote data request. electric windows etc. The scope of the physical layer is the actual transfer of the bits between the different nodes with respect to all electrical properties. to decide which messages received by the LLC sublayer are actually to be accepted.page 34 The Controller Area Network (CAN) is a serial communications protocol which efficiently supports distributed realtime control with a very high level of security. anti-skid-systems.g. lamp clusters.BOSCH 1 INTRODUCTION Sep. to provide means for recovery management and overload notifications.e. Compatibility. To achieve design transparency and implementation flexibility CAN has been subdivided into different layers according to the ISO/OSI Reference Model: • the Data Link Layer the Logical Link Control (LLC) sublayer the Medium Access Control (MAC) sublayer • the Physical Layer Note that in previous versions of the CAN specification the services and functions of the LLC and MAC sublayers of the Data Link Layer had been described in layers denoted as ’object layer’ and ’transfer layer’. At the same time it is cost effective to build into vehicle body electronics. of ROBERT BOSCH GmbH. are connected using CAN with bitrates up to 1 Mbit/s.g. It is in the nature of the MAC sublayer that there is no freedom for modifications. The scope of the MAC sublayer mainly is the transfer protocol. Error Checking. etc. Postfach 30 02 40. electrical features and the interpretation of data to be transferred. There is much freedom in defining object handling. performing Arbitration. Error Signalling and Fault Confinement. to replace the wiring harness otherwise required. Also some general features of the bit timing are regarded as part of the MAC sublayer. Its domain of application ranges from high speed networks to low cost multiplex wiring. Within one network the physical layer. The intention of this specification is to achieve compatibility between any two CAN implementations. Within the MAC sublayer it is decided whether the bus is free for starting a new transmission or whether a reception is just starting. however. controlling the Framing. In automotive electronics. 1991 Introduction Part B .

has to be the same for all nodes. The scope of this specification is to define the MAC sublayer and a small part of the LLC sublayer of the Data Link Layer and to describe the consequences of the CAN protocol on the surrounding layers. There may be. Postfach 30 02 40.BOSCH Sep. 1991 Basic Concepts Part B . much freedom in selecting a physical layer. however. D-70442 Stuttgart . ROBERT BOSCH GmbH.page 35 course.

and Synchronization. The MAC sublayer represents the kernel of the CAN protocol. Error Detection and Signalling. Acknowledgment. Within this specification the Driver/Receiver Characteristics of the Physical Layer are not defined so as to allow transmission medium and signal level implementations to be optimized for their application. D-70442 Stuttgart . The MAC sublayer is responsible for Message Framing. Arbitration. Postfach 30 02 40. Bit Encoding. Overload Notification and Recovery Management. It presents messages received from the LLC sublayer and accepts messages to be transmitted to the LLC sublayer.BOSCH 2 BASIC CONCEPTS CAN has the following properties • • • • • • • • • prioritization of messages guarantee of latency times configuration flexibility Sep. The LLC sublayer is concerned with Message Filtering. • • ROBERT BOSCH GmbH. The MAC sublayer are supervised by a management entity called Fault Confinement which is self-checking mechanism for distinguishing short disturbances from permanent failures.page 36 multicast reception with time synchronization system wide data consistency multimaster error detection and signalling automatic retransmission of corrupted messages as soon as the bus is idle again distinction between temporary errors and permanent failures of nodes and autonomous switching off of defect nodes Layered Architecture of CAN according to the OSI Reference Model • The Physical Layer defines how signals are actually transmitted and therefore deals with the description of Bit Timing. 1991 Basic Concepts Part B .

1991 Basic Concepts Part B . Destuffing) Medium Access Management Error Detection Error Signalling Acknowledgment Serialization / Deserialization Fault Confinement Physical Layer Bit Encoding/Decoding Bit Timing Synchronization Driver/Receiver Characteristics Bus Failure Management LLC = Logical Link Control MAC = Medium Access Control ROBERT BOSCH GmbH.page 37 Data Link Layer LLC Acceptance Filtering Overload Notification Recovery Management Supervisor MAC Data Encapsulation /Decapsulation Frame Coding (Stuffing. D-70442 Stuttgart .BOSCH Sep. Postfach 30 02 40.

This has several important consequences. Messages Information on the bus is sent in fixed format messages of different but limited length (see section 3: Message Transfer). Bit rate The speed of CAN may be different in different systems. Data Consistency: Within a CAN network it is guaranteed that a message is simultaneously accepted either by all nodes or by no node. in a given system the bit-rate is uniform and fixed. Priorities The IDENTIFIER defines a static message priority during bus access. Thus data consistency of a system is achieved by the concepts of multicast and by error handling. so that all nodes in the network are able to decide by Message Filtering whether the data is to be acted upon by them or not.page 38 The scope of this specification is to define the Data Link Layer and the consequences of the CAN protocol on the surrounding layers. 1991 Basic Concepts Part B .g. However. Postfach 30 02 40. Multicast: As a consequence of the concept of Message Filtering any number of nodes can receive and simultaneously act upon the same message. When the bus is free any connected unit may start to transmit a new message. but describes the meaning of the data. Message Routing: The content of a message is named by an IDENTIFIER. System Flexibility: Nodes can be added to the CAN network without requiring any change in the software or hardware of any node and application layer. D-70442 Stuttgart .BOSCH Sep. ROBERT BOSCH GmbH. The IDENTIFIER does not indicate the destination of the message. Information Routing In CAN systems a CAN node does not make use of any information about the system configuration (e. station addresses).

Message Frame Check Performance of Error Detection The error detection mechanisms have the following properties: . Postfach 30 02 40. . .all global errors are detected. If a DATA FRAME and a REMOTE FRAME with the same IDENTIFIER are initiated at the same time. . When a ’recessive’ level is sent and a ’dominant’ level is monitored (see Bus Values).all local errors at transmitters are detected. D-70442 Stuttgart . Error Detection For detecting errors the following measures have been taken: . any unit may start to transmit a message.Monitoring (transmitters compare the bit levels to be transmitted with the bit levels detected on the bus) . If 2 or more units start transmitting messages at the same time. signalling and self-checking are implemented in every CAN node.burst errors of length less than 15 in a message are detected. 1991 Basic Concepts Part B . the DATA FRAME prevails over the REMOTE FRAME.errors of any odd number in a message are detected.up to 5 randomly distributed errors in a message are detected. Safety In order to achieve the utmost safety of data transfer. powerful measures for error detection. Arbitration Whenever the bus is free. the unit has lost arbitration and must withdraw without sending one more bit. ROBERT BOSCH GmbH. The unit with the message of higher priority to be transmitted gains bus access.BOSCH Sep. the bus access conflict is resolved by bitwise arbitration using the IDENTIFIER. During arbitration every transmitter compares the level of the bit transmitted with the level that is monitored on the bus.Cyclic Redundancy Check . Multimaster When the bus is free any unit may start to transmit a message. The mechanism of arbitration guarantees that neither information nor time is lost. If these levels are equal the unit may continue to send.page 39 Remote Data Request By sending a REMOTE FRAME a node requiring data may request another node to send the corresponding DATA FRAME.Bit Stuffing . The DATA FRAME and the corresponding REMOTE FRAME are named by the same IDENTIFIER. .

Acknowledgment All receivers check the consistency of the message being received and will acknowledge a consistent message and flag an inconsistent message. Connections The CAN serial communication link is a bus to which a number of units may be connected. Single Channel The bus consists of a single channel that carries bits. E. the resulting bus value will be ’dominant’. Error Signalling and Recovery Time Corrupted messages are flagged by any node detecting an error. two differential wires. Practically the total number of units will be limited by delay times and/or electrical loads on the bus line. Fault Confinement CAN nodes are able to distinguish short disturbances from permanent failures. This number has no theoretical limit. light) that represent the logical levels are not given in this specification.BOSCH Sep. During simultaneous transmission of ’dominant’ and ’recessive’ bits. electrical voltage. The recovery time from detecting an error until the start of the next message is at most 31 bit times. in case of a wired-AND implementation of the bus. Postfach 30 02 40. 1991 Basic Concepts Part B . Bus values The bus can have one of two complementary logical values: ’dominant’ or ’recessive’. if there is no further error. Sleep Mode / Wake-up To reduce the system’s power consumption. From this data resynchronization information can be derived. Such messages are aborted and will be retransmitted automatically. Physical states (e. etc. The way in which this channel is implemented is not fixed in this specification.g.g. optical fibres. D-70442 Stuttgart . a CAN-device may be set into sleep mode ROBERT BOSCH GmbH.7 * 10-11. For example.page 40 Total residual error probability for undetected corrupted messages: less than message error rate * 4. single wire (plus ground). the ’dominant’ level would be represented by a logical ’0’ and the ’recessive’ level by a logical ’1’. Defective nodes are switched off.

a quartz oscillator is required. although the MAC sublayer will be waiting for the system’s oscillator to stabilize and it will then wait until it has synchronized itself to the bus activity (by checking for eleven consecutive ’recessive’ bits). S. for a more precise evaluation refer to Dais. “Impact of Bit Representation on Transport Capacity and Clock Accuracy in Serial Data Streams”. Multiplexing in Automobiles SP-773 March 1989 For the full bus speed range of the CAN protocol. Chapman. M. the internal activity is restarted. before the bus drivers are set to "on-bus" again. Oscillator Tolerance The Bit Timing requirements allow ceramic resonators to be used in applications with transmission rates of up to 125kbit/s as a rule of thumb.BOSCH Sep.page 41 without any internal activity and with disconnected bus drivers. D-70442 Stuttgart . ROBERT BOSCH GmbH. SAE Technical Paper Series 890532. On wake-up. The sleep mode is finished with a wake-up by any bus activity or by internal conditions of the system. 1991 Message Transfer Part B . Postfach 30 02 40.

CONTROL FIELD. CRC FIELD. 3. they are separated from preceding frames by an INTERFRAME SPACE. 3.BOSCH Sep. DATA FIELD. ACK FIELD. An OVERLOAD FRAME is used to provide for an extra delay between the preceding and the succeeding DATA or REMOTE FRAMEs. In contrast. 1991 Data Frame Part B . Postfach 30 02 40. frames containing 29 bit IDENTIFIER are denoted Extended Frames. END OF FRAME.2. ROBERT BOSCH GmbH.1 DATA FRAME A DATA FRAME is composed of seven different bit fields: START OF FRAME. A REMOTE FRAME is transmitted by a bus unit to request the transmission of the DATA FRAME with the same IDENTIFIER. An ERROR FRAME is transmitted by any unit on detecting a bus error. D-70442 Stuttgart . DATA FRAMEs and REMOTE FRAMEs can be used both in Standard Frame Format and Extended Frame Format.1 Frame Formats There are two different formats which differ in the length of the IDENTIFIER field: Frames with the number of 11 bit IDENTIFIER are denoted Standard Frames.page 42 3 MESSAGE TRANSFER 3. ARBITRATION FIELD.2 Frame Types Message transfer is manifested and controlled by four different frame types: A DATA FRAME carries data from a transmitter to the receivers. The DATA FIELD can be of length zero.

the IDE-Bit.. 1991 Data Frame Part B . All stations have to synchronize to the leading edge caused by START OF FRAME (see ’HARD SYNCHRONIZATION’) of the station starting transmission first. In Extended Format the ARBITRATION FIELD consists of the 29 bit IDENTIFIER. In Standard Format the ARBITRATION FIELD consists of the 11 bit IDENTIFIER and the RTR-BIT. - ROBERT BOSCH GmbH. ID-0. ID-18. ARBITRATION FIELD The format of the ARBITRATION FIELD is different for Standard Format and Extended Format Frames. D-70442 Stuttgart . It consists of a single ’dominant’ bit. The IDENTIFIER bits are denoted ID-28 ..BOSCH Interframe Space Sep.page 43 DATA FRAME Interframe Space or Overload Frame Start of Frame Arbitration Field Control Field Data Field CRC Field ACK Field End of Frame START OF FRAME (Standard Format as well as Extended Format) The START OF FRAME (SOF) marks the beginning of DATA FRAMES and REMOTE FRAMEs. A station is only allowed to start transmission when the bus is idle (see ’INTERFRAME Spacing’).. the SRR-Bit. The IDENTIFIER bits are denoted ID-28 .. and the RTR-BIT. Postfach 30 02 40.

IDENTIFIER . 1991 Data Frame Part B .ID-22) must not be all ’recessive’. Postfach 30 02 40. Standard Format Arbitration Field S O F Control Field R I r T D 0 R E Data Field 11 bit IDENTIFIER DLC Extended Format Arbitration Field S O F Control Field R r r T 1 0 R Data Field 11 bit IDENTIFIER S I R D R E 18 bit IDENTIFIER DLC IDENTIFIER IDENTIFIER .2 now is denoted as IDE Bit. The least significant bit is ID-18. The format comprises two sections: Base ID with 11 bits and the Extended ID with 18 bits ROBERT BOSCH GmbH. D-70442 Stuttgart . The 7 most significant bits (ID-28 . These bits are transmitted in the order from ID-28 to ID-18.Extended Format In contrast to the Standard Format the Extended Format consists of 29 bits.BOSCH Sep.Standard Format The IDENTIFIER’s length is 11 bits and corresponds to the Base ID in Extended Format.page 44 In order to distinguish between Standard Format and Extended Format the reserved bit r1 in previous CAN specifications version 1.0-1.

In a Standard Frame the IDENTIFIER is followed by the RTR bit. the IDE bit. the Base ID (see ’Extended IDENTIFIER’ below) of which is the same as the Standard Frame’s Identifier. SRR BIT (Extended Format) Substitute Remote Request BIT The SRR is a recessive bit. It is transmitted in Extended Frames at the position of the RTR bit in Standard Frames and so substitutes the RTR-Bit in the Standard Frame. Within a REMOTE FRAME the RTR BIT has to be ’recessive’. The Extended ID is transmitted after the SRR bit. It is transmitted in the order from ID-28 to ID-18. Postfach 30 02 40. D-70442 Stuttgart . IDE BIT (Extended Format) Identifier Extension Bit The IDE Bit belongs to . Extended ID The Extended ID consists of 18 bits.the ARBITRATION FIELD for the Extended Format . whereas in the Extended Format the IDE bit is recessive.the Control Field for the Standard Format The IDE bit in the Standard Format is transmitted ’dominant’. which is transmitted ’dominant’ (see ROBERT BOSCH GmbH. CONTROL FIELD (Standard Format as well as Extended Format) The CONTROL FIELD consists of six bits. Therefore. are resolved in such a way that the Standard Frame prevails the Extended Frame. Frames in Standard Format include the DATA LENGTH CODE. RTR BIT (Standard Format as well as Extended Format) Remote Transmission Request BIT In DATA FRAMEs the RTR BIT has to be ’dominant’. 1991 Data Frame Part B . collisions of a Standard Frame and an Extended Frame. In an Extended Frame the Base ID is transmitted first. The format of the CONTROL FIELD is different for Standard Format and Extended Format. It is equivalent to format of the Standard Identifier. followed by the IDE bit and the SRR bit.BOSCH Sep.page 45 Base ID The Base ID consists of 11 bits. The Base ID defines the Extended Frame’s base priority. It is transmitted in the order of ID-17 to ID-0.

This DATA LENGTH CODE is 4 bits wide and is transmitted within the CONTROL FIELD. The reserved bits have to be sent ’dominant’.BOSCH Sep. D-70442 Stuttgart . and the reserved bit r0. Postfach 30 02 40. Coding of the number of data bytes by the DATA LENGTH CODE abbreviations: d ’dominant’ r ’recessive’ Number of Data Bytes 0 1 2 3 4 5 6 7 8 Data Length Code DLC3 d d d d d d d d r DLC2 d d d d r r r r d DLC1 d d r r d d r r d DLC0 d r d r d r d r d ROBERT BOSCH GmbH. Frames in the Extended Format include the DATA LENGTH CODE and two reserved bits r1 and r0. but receivers accept ’dominant’ and ’recessive’ bits in all combinations. Arbitration Field CONTROL FIELD Standard Format IDE / r1 r0 DLC3 and Extended Format DLC2 DLC1 DLC0 Data Field or CRC Field reserved bits Data Length Code DATA LENGTH CODE (Standard Format as well as Extended Format) The number of bytes in the DATA FIELD is indicated by the DATA LENGTH CODE. 1991 Data Frame Part B .page 46 above).

. D-70442 Stuttgart . given by the destuffed bit sequence from START OF FRAME until the end of the DATA FIELD. The remainder of this polynomial division is the CRC SEQUENCE transmitted over the bus. DATA FIELD (Standard Format as well as Extended Format) The DATA FIELD consists of the data to be transferred within a DATA FRAME. // initialize shift register ROBERT BOSCH GmbH. If NXTBIT denotes the next bit of the bit stream. 1991 Data Frame {0. by 0. Postfach 30 02 40.. In order to implement this function. In order to carry out the CRC calculation the polynomial to be divided is defined as the polynomial. DATA FIELD (if present) and. the coefficients of which are given by the destuffed bit stream consisting of START OF FRAME. the CRC SEQUENCE is calculated as follows: CRC_RG = 0. which each contain 8 bits which are transferred MSB first.BOSCH Sep. a 15 bit shift register CRC_RG(14:0) can be used. It can contain from 0 to 8 bytes.page 47 DATA FRAME: admissible numbers of data bytes: Other values may not be used.7. ARBITRATION FIELD. CONTROL FIELD.1. Data or Control Field CRC FIELD Ack Field CRC Delimiter CRC Sequence CRC SEQUENCE (Standard Format as well as Extended Format) The frame check sequence is derived from a cyclic redundancy code best suited for frames with bit counts less than 127 bits (BCH Code). This polynomial is divided (the coefficients are calculated modulo-2) by the generator-polynomial: X15 + X14 + X10 + X8 + X7 + X4 + X3 + 1. CRC FIELD (Standard Format as well as Extended Format) contains the CRC SEQUENCE followed by a CRC DELIMITER.. for the 15 lowest coefficients...8}. Part B .

BOSCH REPEAT Sep. CRC_RG(14:1) = CRC_RG(13:0). reports this to the TRANSMITTER by sending a ’dominant’ bit during the ACK SLOT (it sends ’ACK’).page 48 CRCNXT = NXTBIT EXOR CRC_RG(14). // 1 position IF CRCNXT THEN CRC_RG(14:0) = CRC_RG(14:0) EXOR (4599hex). ROBERT BOSCH GmbH. In the ACK FIELD the transmitting station sends two ’recessive’ bits. D-70442 Stuttgart . ENDIF UNTIL (CRC SEQUENCE starts or there is an ERROR condition) After the transmission / reception of the last bit of the DATA FIELD. ACK DELIMITER). ACK DELIMITER The ACK DELIMITER is the second bit of the ACK FIELD and has to be a ’recessive’ bit. // shift left by CRC_RG(0) = 0. CRC DELIMITER (Standard Format as well as Extended Format) The CRC SEQUENCE is followed by the CRC DELIMITER which consists of a single ’recessive’ bit. As a consequence. ACK FIELD (Standard Format as well as Extended Format) The ACK FIELD is two bits long and contains the ACK SLOT and the ACK DELIMITER. CRC_RG contains the CRC sequence. 1991 Remote Frame Part B . Postfach 30 02 40. the ACK SLOT is surrounded by two ’recessive’ bits (CRC DELIMITER. A RECEIVER which has received a valid message correctly. CRC Field ACK FIELD End of Frame ACK Delimiter ACK Slot ACK SLOT All stations having received the matching CRC SEQUENCE report this within the ACK SLOT by superscribing the ’recessive’ bit of the TRANSMITTER by a ’dominant’ bit.

.. the RTR bit of REMOTE FRAMEs is ’recessive’. independent of the values of the DATA LENGTH CODE which may be signed any value within the admissible range 0. There is no DATA FIELD. CRC FIELD.8. ACK FIELD.BOSCH Sep. Postfach 30 02 40. END OF FRAME. CONTROL FIELD. Contrary to DATA FRAMEs. The value is the DATA LENGTH CODE of the corresponding DATA FRAME. A REMOTE FRAME exists in both Standard Format and Extended Format.2. 1991 Error Frame Part B . 3. Inter Frame Space REMOTE FRAME Inter Frame Space or Overload Frame Start of Frame Arbitration Field Control Field CRC Field ACK Field End of Frame ROBERT BOSCH GmbH.page 49 END OF FRAME (Standard Format as well as Extended Format) Each DATA FRAME and REMOTE FRAME is delimited by a flag sequence consisting of seven ’recessive’ bits. ARBITRATION FIELD. In both cases it is composed of six different bit fields: START OF FRAME. D-70442 Stuttgart .2 REMOTE FRAME A station acting as a RECEIVER for certain data can initiate the transmission of the respective data by its source node by sending a REMOTE FRAME.

The ACTIVE ERROR FLAG consists of six consecutive ’dominant’ bits. The ERROR FLAG’s form violates the law of bit stuffing (see CODING) applied to all fields from START OF FRAME to CRC DELIMITER or destroys the fixed form ACK FIELD or END OF FRAME field. The following second field is the ERROR DELIMITER. The first field is given by the superposition of ERROR FLAGs contributed from different stations. 2. The PASSIVE ERROR FLAG consists of six consecutive ’recessive’ bits unless it is overwritten by ’dominant’ bits from other nodes. an ’error passive’ node may need the bus to be ’bus idle’ for at least 3 bit times (if there is a local error at an ’error passive’ receiver).2. Postfach 30 02 40.page 50 The polarity of the RTR bit indicates whether a transmitted frame is a DATA FRAME (RTR bit ’dominant’) or a REMOTE FRAME (RTR bit ’recessive’). Data Frame ERROR FRAME Interframe Space or Overload Frame Error Flag superposition of Error Flags Error Delimiter In order to terminate an ERROR FRAME correctly. ERROR FLAG There are 2 forms of an ERROR FLAG: an ACTIVE ERROR FLAG and a PASSIVE ERROR FLAG.BOSCH Sep. As a consequence. 1. 3. Therefore the bus should not be loaded to 100%. all other stations detect an error condition and on their part start transmission of an ERROR ROBERT BOSCH GmbH. An ’error active’ station detecting an error condition signals this by transmission of an ACTIVE ERROR FLAG. D-70442 Stuttgart . 1991 Overload Frame Part B .3 ERROR FRAME The ERROR FRAME consists of two different fields.

it will start transmitting an OVERLOAD FRAME (not an ERROR FRAME). which requires a delay of the next DATA FRAME or REMOTE FRAME. Detection of a ’dominant’ bit at the first and second bit of INTERMISSION. Postfach 30 02 40.BOSCH Sep. which both lead to the transmission of an OVERLOAD FLAG: 1.page 51 FLAG.4 OVERLOAD FRAME The OVERLOAD FRAME contains the two bit fields OVERLOAD FLAG and OVERLOAD DELIMITER. ROBERT BOSCH GmbH. 3. If a CAN node samples a dominant bit at the eighth bit (the last bit) of an ERROR DELIMITER or OVERLOAD DELIMITER. The Error Counters will not be incremented. Afterwards it starts transmitting seven more ’recessive’ bits. 2. After transmission of an ERROR FLAG each station sends ’recessive’ bits and monitors the bus until it detects a ’recessive’ bit. 3. The ’error passive’ station waits for six consecutive bits of equal polarity. 1991 Overload Frame Part B . whereas OVERLOAD FRAMEs due to OVERLOAD condition 2 and condition 3 start one bit after detecting the ’dominant’ bit. The PASSIVE ERROR FLAG is complete when these 6 equal bits have been detected. The total length of this sequence varies between a minimum of six and a maximum of twelve bits. beginning at the start of the PASSIVE ERROR FLAG. The start of an OVERLOAD FRAME due to OVERLOAD condition 1 is only allowed to be started at the first bit time of an expected INTERMISSION. An ’error passive’ station detecting an error condition tries to signal this by transmission of a PASSIVE ERROR FLAG. So the sequence of ’dominant’ bits which actually can be monitored on the bus results from a superposition of different ERROR FLAGs transmitted by individual stations. The internal conditions of a receiver. D-70442 Stuttgart . ERROR DELIMITER The ERROR DELIMITER consists of eight ’recessive’ bits.2. There are two kinds of OVERLOAD conditions.

1 have another interpretation of the 3rd bit if INTERMISSION: If a ’dominant’ bit was detected locally at some node. 1991 Interframe Space Part B . all other stations also detect an OVERLOAD condition and on their part start transmission of an OVERLOAD FLAG. At this point of time every bus station has finished sending its OVERLOAD FLAG and all stations start transmission of seven more ’recessive’ bits in coincidence. The OVERLOAD DELIMITER is of the same form as the ERROR DELIMITER. ROBERT BOSCH GmbH. As a consequence. The overall form corresponds to that of the ACTIVE ERROR FLAG. but interpret the first of these six ’dominant’ bits as START OF FRAME. the sixth ’dominant’ bit violates the rule of bit stuffing causing an error condition.BOSCH Sep. OVERLOAD DELIMITER consists of eight ’recessive’ bits. End of Frame or Error Delimiter or Overload Delimiter OVERLOAD FRAME Inter Frame Space or Overload Frame Overload Flag superposition of Overload Flags Overload Delimiter OVERLOAD FLAG consists of six ’dominant’ bits. Note: Controllers based on the CAN Specification version 1.page 52 At most two OVERLOAD FRAMEs may be generated to delay the next DATA or REMOTE FRAME. Postfach 30 02 40. the other nodes will not interpret the OVERLOAD FLAG correctly. The OVERLOAD FLAG’s form destroys the fixed form of the INTERMISSION field.0 and 1. D-70442 Stuttgart . After transmission of an OVERLOAD FLAG the station monitors the bus until it detects a transition from a ’dominant’ to a ’recessive’ bit. In case that there is a ’dominant’ bit detected during the 3rd bit of INTERMISSION then it will interpret this bit as START OF FRAME.

2. 1991 Interframe Space Part B . ERROR FRAME. Postfach 30 02 40. D-70442 Stuttgart . In contrast.page 53 DATA FRAMEs and REMOTE FRAMEs are separated from preceding frames whatever type they are (DATA FRAME. REMOTE FRAME. For stations which are not ’error passive’ or have been RECEIVER of the previous message: Frame INTERFRAME SPACE Frame Intermission Bus Idle For ’error passive’ stations which have been TRANSMITTER of the previous message: Frame INTERFRAME SPACE Frame Bus Idle Suspend Transmission Intermission INTERMISSION consists of three ’recessive’ bits. for ’error passive’ stations. ROBERT BOSCH GmbH.5 INTERFRAME SPACING Sep. INTERFRAME SPACE contains the bit fields INTERMISSION and BUS IDLE and.BOSCH 3. During INTERMISSION the only action to be taken is signalling an OVERLOAD condition and no station is allowed to actively start transmission of a DATA FRAME or REMOTE FRAME. SUSPEND TRANSMISSION. OVERLOAD FRAMEs and ERROR FRAMEs are not preceded by an INTERFRAME SPACE and multiple OVERLOAD FRAMEs are not separated by an INTERFRAME SPACE. OVERLOAD FRAME) by a bit field called INTERFRAME SPACE. which have been TRANSMITTER of the previous message.

The bus is recognized to be free and any station having something to transmit can access the bus. If meanwhile a transmission (caused by another station) starts.BOSCH Note: Sep. and. SUSPEND TRANSMISSION After an ’error passive’ station has transmitted a message. Postfach 30 02 40.page 54 If a CAN node has a message waiting for transmission and it samples a dominant bit at the third bit of INTERMISSION. before starting to transmit a further message or recognizing the bus to be idle. 1991 Conformance Part B . BUS IDLE The period of BUS IDLE may be of arbitrary length. is started in the first bit following INTERMISSION. start transmitting its message with the first bit of its IDENTIFIER without first transmitting a START OF FRAME bit and without becoming receiver. A message. which is pending for transmission during the transmission of another message. The detection of a ’dominant’ bit on the bus is interpreted as a START OF FRAME. the station will become receiver of this message. D-70442 Stuttgart . it will interpret this as a START OF FRAME bit. with the next bit. it sends eight ’recessive’ bits following INTERMISSION. ROBERT BOSCH GmbH.

3. D-70442 Stuttgart .BOSCH Sep.3 Conformance with regard to Frame Formats The Standard Format is equivalent to the Data/Remote Frame Format as it is described in the CAN Specification 1. In order to allow the design of relatively simple controllers.1 and 3.page 55 3. Every new controller can receive messages of the Extended Format. send messages or accept data from messages in Extended Format). 1991 Message Filtering Part B . however. New controllers are considered to be in conformance with this CAN Specification. if it is not TRANSMITTER of that message and the bus is not idle. ROBERT BOSCH GmbH. The unit stays TRANSMITTER until the bus is idle or the unit loses ARBITRATION. if they have at least the following properties with respect to the Frame Formats defined in 3. This requires that Extended Frames are not destroyed just because of their format. whereas the Standard Format must be supported without restriction. It is.g. Postfach 30 02 40.2: Every new controller supports the Standard Format.4 Definition of TRANSMITTER / RECEIVER TRANSMITTER A unit originating a message is called “TRANSMITTER” of that message. not required that the Extended Format must be supported by new controllers.2. In contrast the Extended Format is a new feature of the CAN protocol. RECEIVER A unit is called “RECEIVER” of a message. the implementation of the Extended Format to its full extend is not required (e.

page 56 4 MESSAGE FILTERING Message filtering is based upon the whole Identifier. may be used to select groups of Identifiers to be mapped into the attached receive buffers. D-70442 Stuttgart . 1991 Message Validation Part B .e. Postfach 30 02 40. ROBERT BOSCH GmbH. i. Optional mask registers that allow any Identifier bit to be set ’don’t care’ for message filtering. The length of the mask register can comprise the whole IDENTIFIER or only part of it.BOSCH Sep. If mask registers are implemented every bit of the mask registers must be programmable. they can be enabled or disabled for message filtering.

If a message is corrupted. Receivers: The message is valid for the receivers. 1991 Coding Part B . D-70442 Stuttgart . In order to be able to compete for bus access with other messages. retransmission will follow automatically and according to prioritization. ROBERT BOSCH GmbH. Transmitter: The message is valid for the transmitter.BOSCH 5 MESSAGE VALIDATION Sep. if there is no error until the end of END OF FRAME. if there is no error until the last but one bit of END OF FRAME.page 57 The point of time at which a message is taken to be valid. The value of the last bit of END OF FRAME is treated as ’don’t care’. a dominant value does not lead to a FORM ERROR (cf. is different for the transmitter and the receivers of the message.1). section 7. retransmission has to start as soon as the bus is idle. Postfach 30 02 40.

The bit stream in a message is coded according to the Non-Return-to-Zero (NRZ) method. The remaining bit fields of the DATA FRAME or REMOTE FRAME (CRC DELIMITER. CONTROL FIELD. ACK FIELD. This means that during the total bit time the generated bit level is either ’dominant’ or ’recessive’. The ERROR FRAME and the OVERLOAD FRAME are of fixed form as well and not coded by the method of bit stuffing. ROBERT BOSCH GmbH. and END OF FRAME) are of fixed form and not stuffed. Postfach 30 02 40. DATA FIELD and CRC SEQUENCE are coded by the method of bit stuffing. ARBITRATION FIELD. 1991 Error Handling Part B .BOSCH 6 CODING BIT STREAM CODING Sep. D-70442 Stuttgart . Whenever a transmitter detects five consecutive bits of identical value in the bit stream to be transmitted it automatically inserts a complementary bit in the actual transmitted bit stream.page 58 The frame segments START OF FRAME.

D-70442 Stuttgart . An exception is the sending of a ’recessive’ bit during the stuffed bit stream of the ARBITRATION FIELD or during the ACK SLOT. (Note.BOSCH 7 ERROR HANDLING 7. Postfach 30 02 40. STUFF ERROR A STUFF ERROR has to be detected at the bit time of the 6th consecutive equal bit level in a message field that should be coded by the method of bit stuffing. when the bit value that is monitored is different from the bit value that is sent. The receivers calculate the CRC in the same way as the transmitter.1 Error Detection Sep. A BIT ERROR has to be detected at that bit time. Then no BIT ERROR occurs when a ’dominant’ bit is monitored. • • • • ROBERT BOSCH GmbH. 1991 Error Handling Part B . that for a Receiver a dominant bit during the last bit of END OR FRAME is not treated as FORM ERROR). FORM ERROR A FORM ERROR has to be detected when a fixed-form bit field contains one or more illegal bits. CRC ERROR The CRC sequence consists of the result of the CRC calculation by the transmitter.page 59 There are 5 different error types (which are not mutually exclusive): • BIT ERROR A unit that is sending a bit on the bus also monitors the bus. A TRANSMITTER sending a PASSIVE ERROR FLAG and detecting a ’dominant’ bit does not interpret this as a BIT ERROR. ACKNOWLEDGMENT ERROR An ACKNOWLEDGMENT ERROR has to be detected by a transmitter whenever it does not monitor a ’dominant’ bit during the ACK SLOT. if the calculated result is not the same as that received in the CRC sequence. A CRC ERROR has to be detected.

a STUFF ERROR. unless an ERROR FLAG for another condition has already been started. Whenever a CRC ERROR is detected. For an ’error active’ node it is an ACTIVE ERROR FLAG. Postfach 30 02 40. D-70442 Stuttgart . 1991 Fault Confinement Part B .page 60 A station detecting an error condition signals this by transmitting an ERROR FLAG. a FORM ERROR or an ACKNOWLEDGMENT ERROR is detected by any station. for an ’error passive’ node it is a PASSIVE ERROR FLAG.BOSCH 7. transmission of an ERROR FLAG starts at the bit following the ACK DELIMITER. Whenever a BIT ERROR. transmission of an ERROR FLAG is started at the respective station at the next bit.2 Error Signalling Sep. ROBERT BOSCH GmbH.

Also after a transmission. an ’error passive’ unit will wait before initiating a further transmission.page 61 8 FAULT CONFINEMENT With respect to fault confinement a unit may be in one of three states: • • • ’error active’ ’error passive’ ’bus off’ An ’error active’ unit can normally take part in bus communication and sends an ACTIVE ERROR FLAG when an error has been detected.) For fault confinement two counts are implemented in every bus unit: 1) TRANSMIT ERROR COUNT 2) RECEIVE ERROR COUNT These counts are modified according to the following rules: (note that more than one rule may apply during a given message transfer) 1. 2. It takes part in bus communication. 3. but when an error has been detected only a PASSIVE ERROR FLAG is sent. D-70442 Stuttgart .g. When a RECEIVER detects a ’dominant’ bit as the first bit after sending an ERROR FLAG the RECEIVE ERROR COUNT will be increased by 8. When a TRANSMITTER sends an ERROR FLAG the TRANSMIT ERROR COUNT is increased by 8. Postfach 30 02 40. the RECEIVE ERROR COUNT will be increased by 1. 1991 Fault Confinement Part B . ROBERT BOSCH GmbH. (See SUSPEND TRANSMISSION) A ’bus off’ unit is not allowed to have any influence on the bus. When a RECEIVER detects an error. An ’error passive’ unit must not send an ACTIVE ERROR FLAG.BOSCH Sep. except when the detected error was a BIT ERROR during the sending of an ACTIVE ERROR FLAG or an OVERLOAD FLAG. output drivers switched off. (E.

If an TRANSMITTER detects a BIT ERROR while sending an ACTIVE ERROR FLAG or an OVERLOAD FLAG the TRANSMIT ERROR COUNT is increased by 8. 5. An error condition letting a node become ’error passive’ causes the node to send an ACTIVE ERROR FLAG. If an RECEIVER detects a BIT ERROR while sending an ACTIVE ERROR FLAG or an OVERLOAD FLAG the RECEIVE ERROR COUNT is increased by 8. the RECEIVE ERROR COUNT is decreased by 1. 8. Any node tolerates up to 7 consecutive ’dominant’ bits after sending an ACTIVE ERROR FLAG. PASSIVE ERROR FLAG or OVERLOAD FLAG. After the successful reception of a message (reception without error up to the ACK SLOT and the successful sending of the ACK bit). ROBERT BOSCH GmbH.page 62 Exception 1: If the TRANSMITTER is ’error passive’ and detects an ACKNOWLEDGMENT ERROR because of not detecting a ’dominant’ ACK and does not detect a ’dominant’ bit while sending its PASSIVE ERROR FLAG. After detecting the 14th consecutive ’dominant’ bit (in case of an ACTIVE ERROR FLAG or an OVERLOAD FLAG) or after detecting the 8th consecutive ’dominant’ bit following a PASSIVE ERROR FLAG. and if it was greater than 127. A node is ’error passive’ when the TRANSMIT ERROR COUNT equals or exceeds 128. 9. and after each sequence of additional eight consecutive ’dominant’ bits every TRANSMITTER increases its TRANSMIT ERROR COUNT by 8 and every RECEIVER increases its RECEIVE ERROR COUNT by 8. 7. 4. and should have been ’recessive’. or when the RECEIVE ERROR COUNT equals or exceeds 128. if it was between 1 and 127. In exceptions 1 and 2 the TRANSMIT ERROR COUNT is not changed. After the successful transmission of a message (getting ACK and no error until END OF FRAME is finished) the TRANSMIT ERROR COUNT is decreased by 1 unless it was already 0.BOSCH Sep. and has been sent as ’recessive’ but monitored as ’dominant’. Exception 2: If the TRANSMITTER sends an ERROR FLAG because a STUFF ERROR occurred during ARBITRATION. D-70442 Stuttgart . Postfach 30 02 40. then it will be set to a value between 119 and 127. it stays 0. 1991 Fault Confinement Part B . If the RECEIVE ERROR COUNT was 0. 6.

Note: Start-up / Wake-up: If during start-up only 1 node is online. An ’error passive’ node becomes ’error active’ again when both the TRANSMIT ERROR COUNT and the RECEIVE ERROR COUNT are less than or equal to 127. It can become ’error passive’ but not ’bus off’ due to this reason. 12. Note: An error count value greater than about 96 indicates a heavily disturbed bus. 11. it will get no acknowledgment. D-70442 Stuttgart . It may be of advantage to provide means to test for this condition. 1991 Oscillator Tolerance Part B . An node which is ’bus off’ is permitted to become ’error active’ (no longer ’bus off’) with its error counters both set to 0 after 128 occurrence of 11 consecutive ’recessive’ bits have been monitored on the bus. Postfach 30 02 40.BOSCH Sep. and if this node transmits some message.page 63 10. detect an error and repeat the message. A node is ’bus off’ when the TRANSMIT ERROR COUNT is greater than or equal to 256. ROBERT BOSCH GmbH.

D-70442 Stuttgart . SAE Technical Paper Series 890532. S. must all be equipped with a quartz oscillator.page 64 9 OSCILLATOR TOLERANCE A maximum oscillator tolerance of 1.2 or later. M. Note: Can controllers following this CAN Specification and controllers following the previous versions 1. for a more precise evaluation refer to Dais. ROBERT BOSCH GmbH. “Impact of Bit Representation on Transport Capacity and Clock Accuracy in Serial Data Streams”. a quartz oscillator is required.BOSCH Sep.58% is given and therefore the use of a ceramic resonator at a bus speed of up to 125 Kbits/s as a rule of thumb. Chapman. Postfach 30 02 40.1. 1991 Bit Timing Part B . The chip of the CAN network with the highest requirement for its oscillator accuracy determines the oscillator accuracy which is required from all the other nodes. used in one and the same network.0 and 1. Multiplexing in Automobiles SP-773 March 1989 For the full bus speed range of the CAN protocol. That means ceramic resonators can only be used in a network with all the nodes of the network following CAN Protocol Specification versions 1.

Postfach 30 02 40.BOSCH Sep.PHASE BUFFER SEGMENT1 (PHASE_SEG1) .PHASE BUFFER SEGMENT2 (PHASE_SEG2) form the bit time as shown in figure 1. ROBERT BOSCH GmbH.SYNCHRONIZATION SEGMENT (SYNC_SEG) . NOMINAL BIT TIME SYNC_SEG PROP_SEG PHASE_SEG1 PHASE_SEG2 Sample Point Fig.page 65 10 BIT TIMING REQUIREMENTS NOMINAL BIT RATE The Nominal Bit Rate is the number of bits per second transmitted in the absence of resynchronization by an ideal transmitter. 1991 Bit Timing Part B . D-70442 Stuttgart . These segments . An edge is expected to lie within this segment. 1 Partition of the Bit Time SYNC SEG This part of the bit time is used to synchronize the various nodes on the bus.PROPAGATION TIME SEGMENT (PROP_SEG) . NOMINAL BIT TIME NOMINAL BIT TIME = 1 / NOMINAL BIT RATE The Nominal Bit Time can be thought of as being divided into separate non-overlapping time segments.

the input comparator delay.2. ranging at least from 1 to 32.page 66 PROP SEG This part of the bit time is used to compensate for the physical delay times within the network. and the output driver delay. SAMPLE POINT The SAMPLE POINT is the point of time at which the bus level is read and interpreted as the value of that respective bit.. It is twice the sum of the signal’s propagation time on the bus line. 1991 Bit Timing Part B .2.. PHASE SEG2 These Phase-Buffer-Segments are used to compensate for edge phase errors. with integral values... ROBERT BOSCH GmbH. Starting with the MINIMUM TIME QUANTUM. PHASE_SEG1 is programmable to be 1. It’s location is at the end of PHASE_SEG1. PHASE SEG1. the TIME QUANTUM can have a length of TIME QUANTUM = m * MINIMUM TIME QUANTUM with m the value of the prescaler. Length of Time Segments • • • • • SYNC_SEG is 1 TIME QUANTUM long.. These segments can be lengthened or shortened by resynchronization. D-70442 Stuttgart . Postfach 30 02 40. PHASE_SEG2 is the maximum of PHASE_SEG1 and the INFORMATION PROCESSING TIME The INFORMATION PROCESSING TIME is less than or equal to 2 TIME QUANTA long.BOSCH Sep. INFORMATION PROCESSING TIME The INFORMATION PROCESSING TIME is the time segment starting with the SAMPLE POINT reserved for calculation the subsequent bit level. TIME QUANTUM The TIME QUANTUM is a fixed unit of time derived from the oscillator period. PROP_SEG is programmable to be 1...8 TIME QUANTA long..8 TIME QUANTA long. There exists a programmable prescaler.

Therefore the oscillator frequency of a CAN device tends to be that of the local CPU and is determined by the requirements of the control unit. RESYNCHRONIZATION JUMP WIDTH As a result of RESYNCHRONIZATION PHASE_SEG1 may be lengthened or PHASE_SEG2 may be shortened. Clocking information may be derived from transitions from one bit value to the other. Postfach 30 02 40. In order to derive the desired bitrate. In case of CAN implementations that are designed for use without a local CPU the bittiming cannot be programmable.page 67 The total number of TIME QUANTA in a bit time has to be programmable at least from 8 to 25. On the other hand these devices allow to choose an external oscillator in such a way that the device is adjusted to the appropriate bit rate so that the programmability is dispensable for such components. Note: It is often intended that control units do not make use of different oscillators for the local CPU and its communication device. programmability of the bittiming is necessary.BOSCH Sep. however. The position of the sample point. The RESYNCHRONIZATION JUMP WIDTH shall be programmable between 1 and min(4. The property that only a fixed maximum number of successive bits have the same value provides the possibility of resynchronizing a bus unit to the bit stream during a frame. should be selected in common for all nodes. The amount of lengthening or shortening of the PHASE BUFFER SEGMENTs has an upper bound given by the RESYNCHRONIZATION JUMP WIDTH. D-70442 Stuttgart . 1 4 Time Quanta Phase Buffer Seg. Therefore the bit timing of SLIO devices must be compatible to the following definition of the bit time: SyncSeg 1 Time Quantum PropSeg 1 Time Quantum Phase Buffer Seg. 2 4 Time Quanta 1 Bit Time 10 Time Quanta HARD SYNCHRONIZATION After a HARD SYNCHRONIZATION the internal bit time is restarted with SYNC_SEG. PHASE_SEG1). ROBERT BOSCH GmbH. The maximum length between two transitions which can be used for resynchronization is 29 bit times. Thus HARD SYNCHRONIZATION forces the edge which has caused the HARD SYNCHRONIZATION to lie within the SYNCHRONIZATION SEGMENT of the restarted bit time. 1991 Bit Timing Part B .

and if the PHASE ERROR is negative. 4. HARD SYNCHRONIZATION is performed whenever there is a ’recessive’ to ’dominant’ edge during BUS IDLE. then PHASE_SEG1 is lengthened by an amount equal to the RESYNCHRONIZATION JUMP WIDTH. When the magnitude of the PHASE ERROR is larger than the RESYNCHRONIZATION JUMP WIDTH. RESYNCHRONIZATION The effect of a RESYNCHRONIZATION is the same as that of a HARD SYNCHRONIZATION. • • and if the PHASE ERROR is positive. Only one SYNCHRONIZATION within one bit time is allowed. ROBERT BOSCH GmbH. 1991 Bit Timing Part B . measured in TIME QUANTA. if only ’recessive’ to ’dominant’ edges are used for resynchronization. 3. All other ’recessive’ to ’dominant’ edges fulfilling the rules 1 and 2 will be used for RESYNCHRONIZATION with the exception that a node transmitting a dominant bit will not perform a RESYNCHRONIZATION as a result of a ’recessive’ to ’dominant’ edge with a positive PHASE ERROR. e > 0 if the edge lies before the SAMPLE POINT. The sign of PHASE ERROR is defined as follows: • • • e = 0 if the edge lies within SYNC_SEG. then PHASE_SEG2 is shortened by an amount equal to the RESYNCHRONIZATION JUMP WIDTH. SYNCHRONIZATION RULES HARD SYNCHRONIZATION and RESYNCHRONIZATION are the two forms of SYNCHRONIZATION.BOSCH Sep. 2. when the magnitude of the PHASE ERROR of the edge which causes the RESYNCHRONIZATION is less than or equal to the programmed value of the RESYNCHRONIZATION JUMP WIDTH.page 68 PHASE ERROR of an edge The PHASE ERROR of an edge is given by the position of the edge relative to SYNC_SEG. They obey the following rules: 1. D-70442 Stuttgart . An edge will be used for SYNCHRONIZATION only if the value detected at the previous SAMPLE POINT (previous read bus value) differs from the bus value immediately after the edge. Postfach 30 02 40. e < 0 if the edge lies after the SAMPLE POINT of the previous bit.

page B-41:* Note to Oscillator Tolerance included page B-43: The numbering of the Identifier bits has been changed.BOSCH Differences of CAN Specification Versions 1. page B-54:* A note was introduced because of another interpretation of Start of Frame.3 “Conformance with regard to Frame Formats”. page B-25 and page B-62: Alteration of Fault Confinement rule 6 page B-34 to B-37: The layered architecture of CAN was described by different layers according to the ISO/OSI Reference Model.2 and 2. D-70442 Stuttgart .0 Sep. ROBERT BOSCH GmbH. The respective alterations are marked with an asterisk. page B-51:* According to the Oscillator Tolerance a third condition for generation of an Overload Frame was introduced. page B-56: Chapter 4 “Message Filtering” was introduced recently. page B-67: Note to the bittiming of implementations for ECUs without local CPU. page B-55: Section 3. page B-52:* A note was added because the Interpretation of the last bit of Intermission has been changed.2 has been included in part B of this Specification. page B-64:* Note to the compatibility of the protocol modified according to the Oscillator Tolerances. 1991 -1- Differences Amendment of CAN Specification 1. Postfach 30 02 40.

It is obviously neither a Bit Error. These cases are explained in the following. It could be regarded as a Form Error. their functions are identical. including 82526 and 82C200. (2) The CAN Specification requires the SRR bit to be sent as recessive. D-70442 Stuttgart . the "C Reference CAN Model" and the "VHDL Reference CAN Model". The verifiction is done by the comparision of the functions of an implementation to the functions of the Reference Model when applying a set of test conditions. and the condition for Hard Synchronization (5). nor a Stuff Error. It is neither a Bit Error. more restricted than the protocol specification. nor an Acknowledge Error (see chapter ROBERT BOSCH GmbH. the reception of a dominant SRR bit in an Extended Frame (2). So no condition for Error Signalling (see chapter 7.0 Addendum Mar. nor a Stuff Error. The additional restrictions of the Reference CAN Model apply in the cases of the reception of a Data Length Code > 8 (1). nor a CRC Error. nor a CRC Error. the label "Reference CAN Model" stands for both versions. All existing CAN implementations comply to this de facto standard. but the DLC belongs to the stuffed Control Field and the Form Error is only defined for the fixed-form bit fields (see chapter 6 "Bit Stream Coding"). nor an Acknowledge Error. 1997 -1- Implementation Guide for the CAN Protocol (Addendum to the protocol specification) The Controller Area Network protocol specification document describes the function of the network on the whole. The case of DLC > 8 is not covered by any of the error types defined in chapter 7. The Reference CAN Model defines as de-facto standard the assumption [if received DLC > 8 then DLC := 8]. In this paper.1 "Error Detection". with references to the CAN Specification Revision 2. The specific reaction to those conditions defined by the Reference CAN Model can be regarded as a de facto standard. simplifying the implementation’s verification. expecting to receive 8 data bytes even when the received Data Length Code exceeds its upper limit of 8. the increment of the Receive Error Count when it has reached the Error Passive level (4). the reception of a dominant bit as last bit of End Of Frame (3). Part B : (1) According to the CAN Specification. where the reaction to certain conditions was left open. supporting the protocol’s implementation into the licensees’ CAN controller nodes. no transmitter may send a frame with DLC > 8. the reaction of a receiver to a DLC > 8 is not defined. This Reference CAN Model is in some cases.0. Additionally.BOSCH CAN Specification 2. Postfach 30 02 40. which were designed before the existence of the Reference CAN Model. Bosch provides a Reference CAN Model to the CAN licensees.2) is fulfilled. The receiver’s reaction to a SRR bit sampled as dominant is not defined.

(3) According to chapter 5 "Message Validation". condition 3. This technique is not intended as an example for hardware implementations of CAN protocol controllers. it is irrelevant how much this level is exceeded.0 Addendum Mar. Any node disables Hard Synchronization when it samples an edge from recessive to dominant or when it ROBERT BOSCH GmbH.BOSCH CAN Specification 2. Therefore. where the reception of a dominant bit as the last bit or Error Delimiter of Overload Delimiter is responded with an Overload Frame. a SRR bit received as dominant is not a Form Error. the Fault Confinement Rules could increment the Receive Error Count’s value over all limits.Start of Frame" requires the Hard Synchronization for each received Start of Frame.4 "Overload Flag". Therefore. since the SRR bit is located in a stuffed bit field. which have to be sent as dominant. the fixed-form bit field End of Frame contains an illegal bit and the receiver of the dominant bit may have lost synchronization. the CAN licensee is free to use other solutions best suited for the individual implementation. 1997 -2- 7. the Receive Error Counter is used to count the 128 sequences needed for the Busoff Recovery Sequence (see Fault Confinement Rule 12). which is sufficient for all purposes of fault confinement. And. So the Receive Error Count needs not to be incremented above the Error Passive level. D-70442 Stuttgart . when an Error Passive receiver detects additional errors without receiving any error free message. but whose actual value is ignored by receivers. a message is valid for receivers. which requires a reaction. On the other hand. This cannot be implemented in hardware. because once the Receive Error Count has reached its Error Passive level (128).1 "Data Frame . (5) Synchronization Rule 4 requires the Hard Synchronization to be performed at every edge from recessive to dominant during Bus Idle. the Receive Error Count has a resolution of 8 bits. Since the SRR bit is received before the IDE bit. Postfach 30 02 40.2.2. this dominant bit is not regarded as an error. but also for Suspend state and for the end of the Intermission State. (4) Theoretically. In the Reference CAN Model. So no transmitter may send a dominant SRR bit in an Extended Frame while a receiver ignores the value of the SRR bit (but the value is not ignored for bit stuffing and arbitration). the counter’s value is limited by its actual number of digits.1 "Error Detection"). The Reference CAN Model follows the example of chapter 3. but also during Suspend Transmission and at the end of Intermission. That means only the IDE bit decides whether the frame is a Standard Frame or an Extended Frame. Additionally. the Reference CAN Model enables the Hard Synchronisation not only for Bus Idle state. In the Reference CAN Model. a receiver cannot decide instantly whether it receives a RTR or a SRR bit. even when the last bit of End of Frame is received as dominant. chapter 3. A Start of Frame can be received not only during Bus Idle. The Reference CAN Model defines as de-facto standard that the SRR bit is treated like the Reserved Bits.

Part A. chapter 9. D-70442 Stuttgart .BOSCH CAN Specification 2.2 (see CAN Specification Revision 2. Since the synchronization on edges from dominant to recessive has become obsolete with the upgrade from CAN protocol version 1. ROBERT BOSCH GmbH.1 to version 1.0 Addendum Mar.0.1 section [4]) the Reference CAN Model does not support this kind of synchronization. 1997 -3- starts to send the dominant Start of Frame bit. Postfach 30 02 40.