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.
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
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.
CAN protocol is very enriched in features which motivates one should use for data communication-
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
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
CAN Network architecture is like below image :
As shown in above figure CAN network is basically made of Node and CAN Bus.Node have basically three components :
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.
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.
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.
NRZ encoding use to change Controller digital signal into BUS level. Go through the article for more detail.
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.
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.
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
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).
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
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
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.
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
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
These states are basically parts of error confinement. Go through with this article for detail about these states of a node.
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.