CAN Protocol

CAN Protocol

Get Started. It's Free
or sign up with your email address
Rocket clouds
CAN Protocol by Mind Map: CAN Protocol

1. Introduction to CAN

1.1. Communication between Various ECUs like EMS,ABS,Gear Control etc..

1.1.1. Developed by Robert Bosch

1.1.2. No Host required

1.1.3. Broadcast BUS

1.1.4. Serial Half-Duplex Asynchronous Communication

1.1.5. Differential Two-Wired Communication

1.1.6. Designed Originally for Automobiles

1.1.7. Designed for On-Board Diagnostics

2. Standard and Implementation

2.1. Standardized since 1991 and is described by 4 ISO documents...ISO 11898-1,ISO 11898-2,ISO 11898-3,ISO 11898-4

2.1.1. ISO 11898-1 covers 2 layers of OSI model and it is an event driven communication.

2.1.2. ISO 11898-2 covers 2 sub-layers of the model for the data communication i.e Physical Medium Attachment and Physical Medium Specification. It allows data rates upto 1 Mbps . It is used in powertrain and chassis areas of the automobile.

2.1.3. ISO 11898-3 covers 2 sub-layers of the model for the data communication i.e Physical Medium Attachment and Physical Medium Specification. It allows data rates upto 125 Mbps . It is used in the convenience area of the automobile.

2.1.4. ISO 11898-4 is an extension of the data link layer service and add a time triggered communication option for CAN based networks.

3. CAN Versions

3.1. CAN 2.0.

3.1.1. CAN 2.0 A refers to Standard Frame Format with 11 bit identifier.

3.1.2. CAN 2.0 B refers to Extended Frame Format with 29 bit identifier.

3.2. CAN FD

3.2.1. Developed in 2011 and released in 2012 by Robert BOSCH

4. CAN Network

4.1. CAN network is usually based on line topology.Sometimes,it can be star topology also.

4.2. Physical transmission medium is UTP.

4.3. The maximum data rate is 1 Mbit/s.

4.4. Maximum length is 40 meters.

4.5. ISO 11898 specifies maximum CAN nodes as 32.

5. Frame Formats

5.1. It consists of two frame formats

5.1.1. Standard Frame Format

5.1.2. Extended Frame Format

6. Need for CAN

6.1. Conventional Networking

6.1.1. Physical Communication channel was allocated to every channel to be transmitted.It offers limited data exchange but,increases wire harness ,cost and complexity of the system.

6.2. Bus Networking

6.2.1. To overcome conventional networking issue, CAN was introduced as a centralized solution which followed bus networking .It enables serial bit exchange of data via single channel. This solution is quite efficient due to its message prioritization and flexible as node can be inserted and removed without affecting the network.

7. Frame Types

7.1. There are four different frames which can be used on the BUS.

7.1.1. Data Frame

7.1.2. Remote Frame

7.1.3. Error Frame

7.1.4. Overload Frame

8. Communication Principles

8.1. From the network, smaller the message identifier, higher is its priority. A node wish to send message must wait until the bus becomes idle.If the bus is idle, it sends the SOF bit, the dominant bit to take the bus access,then it sends the message identifier with the MSB.During this phase if this node detects the dominant bit on the bus while it has transmitted the recessive bit it clearly means the node has lost the arbitration,stops sending the further bits.It waits and try again once this bus is free again

9. Advantages

9.1. Low Cost

9.2. Reliable

9.3. Flexibility

9.4. Good Speed

9.5. Multi-master Communication

9.6. Fault-Confinement

9.7. Broadcast Capability

9.8. Standardised

10. Applications

10.1. Passenger Vehicles,Trucks,Buses

10.2. Electronic Equipment for Aviation and Navigation

10.3. Elevators,Escalators

10.4. Building Automation

10.5. Medical Instruments and Equipment

11. CAN Node

11.1. It consists of 3 sub elements

11.1.1. Host It runs core application to do some specific job.A host decides what the received message means and what message it want to send next.

11.1.2. CAN Controller It deals with communication functions prescribed by the CAN protocol and it also triggers interrupt upon transmission and reception of messages.

11.1.3. CAN Transceiver It is responsible for transmission and reception of data on CAN bus.It converts the CAN signal collected from the bus into stream of data which CAN controller can understand.

12. CAN Arbitration

12.1. There are two bus levels of CAN

12.1.1. Dominant Level This level corresponds to logical '0'

12.1.2. Recessive Level This level corresponds to logical '1'

13. Arbitration Process: When different CAN nodes sends dominant and recessive bus levels simultaneously, the bus remains dominant. And , the recessive bus level occurs only if all nodes sends recessive state. Such behavior is called AND logic.

14. Start Of Frame

14.1. Start of a new frame in a network.It consists of single dominant bit.

15. Arbitration Field

15.1. This field is also called Message Identifier. It indicates the meaning and content of the message and the priority of the message.

15.1.1. In Base Format, the Arbitration Field consists of the BASE Identifier and the RTR bit. A dominant IDE bit indicates 11 bit Standard bit Identifier. RTR bit has to be dominant for Data Frame and Recessive for Remote Frame

15.1.2. In Extended Format, the Arbitration field consists of the Extended identifier,the Substitute remote Request (SRR) bit, the IDE bit and the Remote transmission request (RTR) bit. A Recessive IDE bit indicates 29 bit Extended bit Identifier SRR bit is recessive and this is applicable in Extended Format . RTR bit has to be dominant for Data Frame and Recessive for Remote Frame

16. Control Field

16.1. This field defines the User-defined functions.

16.1.1. In CAN Base Format, the control Field consists of the IDE,ro and 4 bits wide Data Length Code (DLC).

16.1.2. In CAN Extended Format, the control Field consists of the r1,r0 and 4 bits wide Data Length Code(DLC).

17. Data Field

17.1. This field consists of the actual information which is used to be transmitted.The number of data bytes may vary from 0 to 8 and transmission start with MSB bit first

18. CRC Field

18.1. It is a 15 bit which is used to detect any data corruption in transmission.The sender will compute the CRC before sending the frame.After receiving the frame,each receiver will compute the CRC again and compare with it.If the CRC doesnot match, the receiver will generate the error frame.CRC delimiter marks the end of CRC.

19. ACK field

19.1. This field consists of 2 bits,,Ack slot and ACK delimiter.It can be dominant and recessive.

20. End of Frame

20.1. End of Frame consists of 7 recessive bits and marks the end of data frame.

21. r1,ro are the reserved bits and DLC is used to indicate how many data bytes are transmitted and It may take values from 0 to 8 and other values are not allowed.

22. These are the most commonly used frame and used when node transmits information to any/all other nodes in the system. These frames consists of fields that provide additional information about the message as defined by the CAN specification. Embedded in the data frames are Arbitration field,control field,Data field,CRC field,Acknowledge field and an end of frame.

23. The purpose of the remote frame is to seek permission for the transmission of data from another node.This is similar to data frame without data field and RTR bit is recessive.

24. If transmitting a receiving node detects an error, it will immediately abort transmission and send error frame consisting of an error flag made up of 6 dominant bits and error flag delimiter made up of 8 recessive bits.

25. It is similar to error frame, but used for providing extra delay between the messages. An Overload Frame is generated by a node when it becomes too busy and is not ready to receive.

26. Logical Error Detection

26.1. To detect corrupted messages, the CAN protocol defines five mechanisms and they are..

26.1.1. Bit Error

26.1.2. Stuff Error

26.1.3. CRC Error

26.1.4. Form Error

26.1.5. ACK Error

27. This error occurs when bit received is not the value transmitted. Ex:Transmitter is recessive bit when it received back it received the dominant value. Bit error occurs in CAN network.

28. This error occurs when more than 5 consecutive bits of same polarity bits are received in a CAN network.

29. This type of error occurs when CRC sent is calculated and compared wrong at the recessive bit.

30. Violation of Fixed form of fields in a CAN network results Form Error. Ex: CRC delimiter,ACK delimiter,EOF,IFS must be recessive bit always ,it must not be dominant bit.

31. ACK field consists of 2 bits..ACK slots,ACK delimiter.In ACK slots, the transmitting slots sends recessive bit following the receiver has to send back the dominant bit in ACK slot.If this doesnot occurs it leads to Acknowledgement Error.