• admin@embedclogic.com

CAN Interview Questions

I have tried to collect most of the questions related to CAN Protocol which can ask by your Interviewer. I suppose that you must have gone through my CAN protocol tutorial before starting this Q&A.

What Is CAN protocol?

CAN Stands for Controller Area Network patented by Robert Bosch in
1986 to replace conventional wiring used between ECUs for data sharing between ECUs in vehicle.

Conventional to CAN Network Transition

It is an asynchronous serial communication protocol. it allows up to 1 Mbps bit rate for 40m wire length. Most popular bit rate is 500 kbps for 100m length. For more detail go through this article.

CAN Protocol Basically used on Physical layer(11898-2), Data link layer
(11898-3) , and the transport layer(15765-2).

Physical layer standard used for bit encoding with NRZ line code and data link layer used for error detection, handling, Message receiving/transmission while transport layer protocol 15765-2 used for data packet handling if the data length is greater than 8 byte(<4096 bytes).

CAN protocol allows only 8-byte data in CAN Frame. More than 8-byte data will be fragmented in the 8-byte frame as per 15765-2 standard at the transport layer. For more detail go through this article.

What is Featured of CAN Protocol?

CAN protocol is very enriched in features which motivates one should use for data communication-

  1. Simple and flexibility in Configuration
  2. CAN is Message-Based Protocol
  3. Message prioritization feature through identifier selection.
  4. CAN offer Multi-master Communication
  5. Error Detection and Fault Confinement feature
  6. Retransmission of the corrupted message automatically when the bus is idle.

Apart from these, CAN protocol have other powerful features. It offers the in-built features in CAN controller like synchronization of nodes, Frame Integrity check through CRC mechanism etc. because of all these features offered at h/w level, lots of software coding overhead reduced. for detail about features list please go through this article

Why CAN is asynchronous communication?

Basically two types of communication exist –

Synchronous Communication – Each bit of data drive to sync with a clock signal and master drives the clock signal means master can only initiate data communication.

Asynchronous communication – Data transmission is not sync with any external clock signal.it may be transmitted intermittently.In case of CAN a bit transmission follow the bit time concept which is associated with the time Quanta.Follow this article for more detail.

Explain CAN architecture with respect to OSI Layer.

CAN Network architecture is like below image :

CAN Architecture Diagram

As shown in above figure CAN network is basically made of Node and CAN Bus.Node have basically three components :

  1. MCU which is host controller and decides how to deal with received or transmit data.It process data from the Application layer to the network layer and vice versa.
  2. CAN Controller take care of the message reception and transmission, error detection and handling etc.
  3. CAN Transceiver convert the CAN controller data into bus level before sending on CAN Bus and vice-versa.

ISO mapped the CAN protocol specification with the OSI model according to above architecture. CAN protocol basically works on three OSI layers: Physical layer, Data Link Layer and Transport layer. Go through from this article for detail.

Why CAN Bus uses differential Cable?

CAN Protocol used two wire twisted pair cables for CAN Bus architecture to reduce cross-talk and EMI. Please go through this article for detail.

Why CAN Bus Topology uses terminator register at the end?

In Bus topology,terminator register is used whether in CAN or Ethernet or somewhere else to absorb the signal at the end to avoid reflection.Terminator register must be equal to the impedance generated because of signal(V/I).In CAN usually 100-120 ohm resistance used at the end of differential cable.

Why CAN BUS uses NRZ encoding instead of RZ?

NRZ encoding use to change Controller digital signal into BUS level. Go through the article for more detail.

Explain High Speed CAN and Low Speed CAN

High Speed CAN and Low Speed CAN(Fault Tolerant CAN) is basically two architecture for Node arrangement at CAN network on physical layer.ISO codified this architecture in 11898-2(High Speed CAN) and 11898-3 (Low-Speed CAN). Its basically differ on speed and voltage level. Go through this article for detail.

What is difference between standard CAN and Extended CAN

Originally Bosch released CAN specification CAN 2.0 for passenger Vehicles which explains 11- bit identifier frame architecture but later on it divided into CAN 2.0(A) which is named as standard CAN be used in passenger cars dealing with 11-bit Identifier while other is CAN2.0(B) which is known as extended CAN be used in heavy vehicles like Buses and Trucks it deals with 29-bit Identifier. So the basic difference in both standard at message Identifier field. For detail, frame architecture, Go through this article.

Can Standard CAN and extended CAN coexist in the same network? who will win arbitration if first arbitration field is same?

As you have seen in CAN frame format in above question only Arbitration field in the extended frame format only differ from the standard CAN means extended CAN architecture designed in such a way that standard and extended CAN coexist on the same network. In extended frame format the IDE bit distinguish between standard and extended CAN.

IDE bit is dominant(1) for the Standard frame and recessive for the extended frame.so standard frame will win arbitration if both have same 1st identifier field(11-bit).

What is CSMA/CA and CSMA/CD in CAN Communication?

CSMA stands for Carrier Sense multiple Access.This concept is use in transmission media access.if multiple ECUs are connected on sharing same transmission medium to transfer its data then there is possibility of collision and data corruption if multiple nodes start transmission same time.CSMA introduce two concept CSMA/CA and CSMA/CD to avoid this situation.

CSMA/CA is carrier sense multiple access /collision avoidance. It is applicable before starts of transmission. The node having CSMA/CA enabled feature first check the transmission medium status before starting transmission and if BUS is idle(means not is use) then it will start transmission otherwise it will wait for the bus to be idle. In CAN this feature is introduced by the Arbitration concept. Look at this article for arbitration concept in CAN.

CSMA/CD is Carrier Sense Multiple Access/Collision Detection. It is applicable when data transmission starts. A Node with CSMA/CD enabled feature detects the collision and stop the further data transmission. It will initiate data re-transmission. In CAN this feature is successfully implemented through Bit Monitoring feature of Transmitter node.see for detail bit monitioring Concept.

How many Types of CAN frame exist?explain functionality of each frame.

There are four types of frame exist-Data Frame to carry Data,Remote Frame for request data from other node,Error Frame for acknowledging transmission/reception error,and last one is overload frame used for wait time request if node is busy. Go through from this article for detail.

Who will win the arbitration, Data frame or Remote Frame if both comes at CAN Bus with same identifier?

Data frame will win the arbitration because the arbitration field contains Identifier+RTR. Here identifier is same but RTR is dominant in case of Data Frame while recessive in case of the remote frame.CAN bus works on wired and logic so 1&0=0. So the final value on CAN bus will be dominant(0). So Ecu which sends data frame(RTR=0) will get same value what it transmitted while ECU which sent remote frame will not get same value and consider that bus is busy and stop further transmission and wait for the bus to be idle and another ECU will continue its data frame transmission

Explain the types of CAN error? Which concept is used behind bit error detection?

There are 5 types of error exist in CAN- Bit error, Stuff error, CRC error, Ack Error, Form Error. Some of the error detected by transmitters like Bit error and ACK error and some by the receiver like Stuff error, CRC error,Form Error.Go through with this article to know all about error detection.

What is active error, passive error and Bus-off state?

These states are basically parts of error confinement. Go through with this article for detail about these states of a node.

What is bit time? Calculate no. of time quanta required to achieve 500kbps bit rate if system frequency is 40mhz and clcok devider is 4.

Bit time is the time required to carry a bit on CAN bus.it is calculated in time quanta ,a smallest unit of bit time.Go through with the detail about bit time and its calculation.

"Knowledge is never useless"

Subscribe and stay updated with our latest articles.

 

 

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Embedclogic will use the information you provide on this form to be in touch with you and to provide updates and marketing.