Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
About CAN Protocol
3.
Most commonly asked CAN Protocol Interview Questions and Answers
3.1.
1. What is the role of a single multiplex wire?
3.2.
2. What is the standard data rate for CAN buses?
3.3.
3. What is Arbitration?
3.4.
4. On which logic does the CAN protocol work?
3.5.
5. How many types of error exist in CAN protocol?
3.6.
6. What are the voltage levels in the CAN protocol?
3.7.
7. To transfer media, can we use the CAN protocol?
3.8.
8. Can a bus use differential cable?
3.9.
Question 9: In the CAN protocol, which frame format is used?
3.10.
10. What is the length of CRC and CRC delimiter in the CAN protocol
3.11.
11. Define CAN messages, and their types
3.12.
12. Write the applications of the CAN protocol
3.13.
13. What is CAN network topology
3.14.
14. Define the CANopen protocol
3.15.
15. What are common issues that can occur in CAN buses?
3.16.
16. Is it possible to send more than 8 bytes of data in CAN protocol?
3.17.
17: What are the different methods of bus management?
3.18.
18. What are the different states where the CAN controller may work.
3.19.
19. For what purpose does the CAN protocol have 120 ohms at each end?
3.20.
20. Why CAN bus topology use a terminator register at the end?
3.21.
21. How extended and standard CAN are different from each?
3.22.
22. What do you understand by the terms high-speed and low-speed CAN?
3.23.
23. What do you understand by the terms CSMA/CA and CSMA/CD in CAN communication? 
3.24.
24. Write the features of the CAN protocol.
3.25.
25. What is the importance of message collision avoidance?
3.26.
26. In CAN bus, what are the different ways a node can transmit a message?
3.27.
27. What is bit stuffing, and why is it used?
3.28.
28: What is hard and soft synchronization?
3.29.
29: Why do we use transceivers in the CAN protocol?
3.30.
30: What do you mean by the term CSMA?
4.
Conclusion
Last Updated: May 21, 2024

CAN Protocol Interview Questions

Author Monika Yadav
0 upvote
Master Power BI using Netflix Data
Speaker
Ashwin Goyal
Product @
18 Jun, 2024 @ 01:30 PM

Introduction

Hello Ninjas, are you looking for CAN protocol interview questions? If Yes, then you land up at the correct place. CAN is the most famous communication protocol for automotive applications. So what are we waiting for? Let's start with CAN protocol and explore as much as we can. 

CAN Protocol Interview Questions

About CAN Protocol

CAN is an abbreviation for Controller Area Network. This protocol is developed by Robert Bosch. The CAN protocol is used to eliminate excessive wiring in automobiles. This protocol is designed to eliminate the host computer presence and make it easy for microcontrollers and other devices to communicate with each other. Initially, the CAN protocol was designed to resolve the issue of communication within vehicles. But because of the features of CAN, this protocol is now used in several fields. 

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Most commonly asked CAN Protocol Interview Questions and Answers

1. What is the role of a single multiplex wire?

Answer: Each CAN mechanism consists of a CAN device, and the device sends data across the network in packet form called a CAN frame. The CAN protocol eliminates the wiring by allowing electronic devices to communicate with each other through a single multiplex wire.

2. What is the standard data rate for CAN buses?

Answer: In the CAN bus, the standard data rate is 1Mbps. Standard data rate is nothing but a number of bits transmitted per second.

3. What is Arbitration?

Answer: In CAN protocol, Arbitration is the process which decides which node on a CAN bus has to transmit data at priority. All nodes on the bus have equal priority, so the arbitration process plays an important role to avoid collision.

4. On which logic does the CAN protocol work?

Answer: CAN protocol works on wired AND Logic. This means when two senders send the data simultaneously, the sender who sends 0 gets priority.

5. How many types of error exist in CAN protocol?

Answer: Types of errors detected in CAN protocol are:

  • Bit
  • Bit stuffing 
  • CRC(Cyclic Redundancy Check)
  • ACK(Acknowledgment Code)
  • Form error

6. What are the voltage levels in the CAN protocol?

Answer: The two CAN protocol voltage levels are:

  • For CANH(CAN high), the voltage is 3.3 volts.
  • For CANL(CAN low), the voltage is 1.5 volts.

7. To transfer media, can we use the CAN protocol?

Answer: No, it is not capable of transferring media in CAN protocol.

8. Can a bus use differential cable?

Answer: Yes, CAN protocol used two-wire twisted pair cables to reduce crosstalk and EMI. Also, twisting the two lines helps reduce the magnetic field.

Question 9: In the CAN protocol, which frame format is used?

Answer: In CAN, there are two frame formats:

  • Base frame format, which has 11 identifier bits.
  • Extended frame format, which has 29 identifier bits.

10. What is the length of CRC and CRC delimiter in the CAN protocol

Answer: In a standard CAN frame, the length of CRC is 15 bits long, whereas for CRC delimiter is 1 bit long. So, we can say that the complete length of the delimiter and CRC filed is 16 bits long.

11. Define CAN messages, and their types

Answer: CAN message is defined as a  message-based protocol. CAN bus devices are called nodes. Each node consists of a CPU, transceiver, and controller. Nodes send and receive data but not at the same time. Moreover, data can not be sent directly to each other. The types of CAN messages are:

  • Data frame
  • The error frame
  • The remote frame
  • The overload frame

12. Write the applications of the CAN protocol

Answer: Some applications of CAN protocol are:

  • CAN protocol are used in elevators and escalators.
  • They can be used in aviation and navigation electronic equipment.
  • They are used in medical instruments and equipment.
  • They are highly used in gasoline and electric vehicles like passenger vehicles, trucks, and buses.
  • CAN protocol plays an important role in the automation industry.

13. What is CAN network topology

Answer: There are several topologies that are supported by CAN. Some commonly used topologies are-

  • Star topology: In star topology, all the nodes are connected to a central hub or a switch.
  • Loop topology: In loop topology, all the nodes are connected in a loop formation.
  • Bus topology: In a bus topology, all the nodes are connected to a bus.
  • Combination topology: In combination topology, various topologies are grouped together to form a hybrid network.

14. Define the CANopen protocol

Answer: CANopen protocol is nothing but a communication language. It is a high-level communication protocol. This protocol was developed for embedded systems. This protocol has several applications, like medical equipment, Off-road vehicles, railways, and maritime electronics.

15. What are common issues that can occur in CAN buses?

Answer: The common issues that can be occurred while using CAN buses are:

  • Failure of nodes.
  • Corruption of data.
  • Collisions of data.
  • Interference of signals.

16. Is it possible to send more than 8 bytes of data in CAN protocol?

Answer:  No, It is not possible to send data of more than 8 bytes in one frame. CAN protocol itself has a limit of a maximum of 8 bytes. So, we cannot send more data of more than the maximum limit in one frame.

17: What are the different methods of bus management?

Answer: The different methods of bus management are:

  • Bitwise arbitration
  • Master/slave
  • Daisy Chain
  • TDMA(Time Division Multiple Access)

18. What are the different states where the CAN controller may work.

Answer: The different states of CAN controller are:

  • Error active state: In this state, an active error flag is generated for each detected error. (six consecutive dominant bits queue). 
  • Bus off state: In this state, a node is automatically disconnected from the bus if many errors are detected by that node.
  • Error passive state: In this state, a passive error flag is generated for each detected error. (six consecutive recessive bits queue).

19. For what purpose does the CAN protocol have 120 ohms at each end?

Answer: The main purpose of 120 ohms at each end is to reduce noise and minimize the reflection reference. It also ensures communication failure does not take place due to reflection. The transmission line must be terminated.

20. Why CAN bus topology use a terminator register at the end?

Answer: CAN bus topology use a terminator register to absorb the signal at the end to avoid the reflection issue. The terminator register should be equal to the impedance. At the end of the differential cable, 100-120 ohm resistance is used by CAN.

Click on the following link to read further: Javascript Interview Questions and Answers

Moving forward, let’s discuss hard-level CAN Protocol interview questions.

21. How extended and standard CAN are different from each?

Answer: The extended and standard CAN frames are the two different types of frames in a CAN protocol. They vary in the amount of data they can hold. They also vary in the format of the identifiers. Extended CAN frame support a 29 bits length for the identifier, which is made up of an extension of 18 bits. On the other hand, the Base CAN can support an 11-bit identifier.

22. What do you understand by the terms high-speed and low-speed CAN?

Answer: High-speed CAN: Depending on the cable length, high-speed CAN offers band rates from 40K bits to 1M bit/sec. These CAN networks are terminated with 120-ohm resistors on each end. This CAN network allows for a simple cable connection between devices. For device net and CANopen specification, this physical standard is used.

Low-speed CAN: Low speed or fault tolerant offers band rates from 40K bits to 125K bits/sec. In the case of a low-speed CAN network, every device has its own termination. In case of wiring failure on the CAN bus lines, this standard allows the CAN bus to continue the communication.

23. What do you understand by the terms CSMA/CA and CSMA/CD in CAN communication? 

Answer: CSMA/CA is an abbreviation of “Carrier sense multiple access/collision avoidance." Before sending the data, it checks the state of the medium. The nodes having CSMA/CA have features that first check the transmission medium. If the bus is not free, it will wait for the bus to be idle and then only start transmission. It is applicable before starting the transmission.

CSMA/CD is an abbreviation of “Carrier sense multiple access/collision detection”. This feature is enabled when the data transmission starts. A node with CSMA/CD has features to detect the collision and immediately stop the data transmission.

24. Write the features of the CAN protocol.

Answer: CAN protocol has several features. Some of these features are the following:

  • It is simple and flexible.
  • The cost of the CAN protocol is low.
  • CAN also offer multi-master communication.
  • This protocol also helps in fault confinement and the detection of errors.
  • Whenever the bus is idle, automatically, the corrupted message will be retransmitted.

25. What is the importance of message collision avoidance?

Answer: In CAN buses, message collision avoidance plays an important role. It helps to ensure that due to collisions between multiple messages, any message can not be lost or corrupted. CAN buses can operate reliably and efficiently by avoidance of message collisions.

26. In CAN bus, what are the different ways a node can transmit a message?

Answer: There are many ways by which a node can transmit a message in a CAN bus:

  • We can directly send and receive messages by using a transceiver.
  • By using a gateway to interface with other networks.
  • Also, we can use a controller for managing the bus and sending data as required.

27. What is bit stuffing, and why is it used?

Answer: NRZ-5 protocol is used by CAN with Bit stuffing. The Bit stuffing provides a guaranteed edge on the signal. Only five consecutive bits can be transmitted by the transmitter with the same value. After the five bits, the transmitter inserts a stuff bit with different states. The use of bit stuffing is for running the length-limited coding.

28: What is hard and soft synchronization?

Answer: During the Idle bus, at every edge, hard synchronization has to be performed from the recessive to the dominant edge. For each received SOF bit, hard synchronization is required. A SOF bit can be received both during suspend transmission and bus idle. 

Hard synchronization: While the idle bus, hard synchronization is done with the falling edge.

Soft synchronization: When a CAN frame is received, Soft synchronization is used to shorten or lengthen a bit of time.

29: Why do we use transceivers in the CAN protocol?

Answer: Transceivers are used in CAN protocol for the following reasons:

  • Sending
  • Receiving

For sending, it converts the transmit bit signal into a signal that is sent onto the bus. On the other hand, for receiving, it adapts to the signal levels from the bus and has protective circuitry.

30: What do you mean by the term CSMA?

Answer: CSMA is an abbreviation of “Carrier sense multiple access”. CSMA is used in transmission media access. If multiple ECUs use the same transmission medium to transfer data simultaneously, there will be a possibility of collision and corruption of data. That is why CSMA introduced CSMA/CA and CSMA/CD to avoid collision and data corruption.

Conclusion

Dealing with many questions, we came to the end of the article. I hope these questions help you understand the basic knowledge of CAN protocol. So far, we have discussed easy, medium, and hard-level CAN protocol interview questions. You can read more such articles on our platform, Coding Ninjas Code360. If you want to improve or practice coding questions visit our website Coding Ninjas and grab your dream jobs in product-based companies. For interview preparation, you can read Interview Experiences of popular companies. 

Recommended Readings:

You can also consider our Interview Preparation Course to give your career an edge over others.

Happy Coding!

Previous article
Networking Interview Questions Part-2
Next article
.NET Interview Questions
Live masterclass