CAN Protocol Interview Questions Part-2

1. What is Bit Stuffing in CAN protocol?

The bit stuffing is performed to ensure synchronization of all nodes participating in communication over CAN.

During transmission of a message, a maximum of five consecutive bits may have same polarity. If it is more than 5 bits, the transmitter will insert additional bit of opposite polarity into the bit stream before transmitting further bits which is called as Bit Stuffing.

The receiver also checks number of bits of same polarity and removes the stuffed bits again from the bit stream. This is called as De-Stuffing.

2. Explain the CAN Protocol Standard Frame Format.

Start of Frame : The CAN frame always starts with dominant bit i.e. the SOF (Start Of Frame) bit is always dominant bit.

The Start of Frame dominant bit provides hard synchronization between the Tx and Rx.

Arbitration Field : The Arbitration field consists of 11-bit identifier and RTR bit. The Identifier is used for arbitration. The identifier determines the frame priority.

The Remote Transmission Request (RTR) bit has to be dominant in data frame and recessive in remote frame.

Control Field : The control field consist of IDE and DLC bits as shown below-

IDE (Identifier Extension) – This bit indicates if Identifier is standard or extended. Its value is Dominant bit in case of Standard Frame.

DLC (Data Length Code) – This indicates how many bytes are to be transmitted (0-8).

R0 is a unused bit.

Data Field : The Data field contains actual information to be transmitted.

The number of data bytes vary from 0-8 and the transmission starts with MSB first.

CRC Field : The CRC field contains 15 bit CRC code for error detection and a Delimiter field.

The Delimiter marks the end of CRC field and is recessive.

ACK Field : The ACK contains the ACK slot and ACK Delimiter.

ACK bit can be dominant or recessive depending on the case.

In ACK field, transmitting station sends two recessive bits. Receiver which has received valid message reports this to transmitter by sending a dominant bit in ACK slot. So if transmitter finds dominant bit in ACK slot it concludes that the transmission is successful.

Only after CRC match is successful, the receiver makes the ACK bit dominant.

The Delimiter marks end of ACK field.

End Of Frame (EOF) : The 7 recessive bits mark the End Of Frame.

3. Explain the CAN Protocol Extended Frame Format.

The Extended frame format is similar to standard except few additional bits and here 29-bit identifier is used compared to 11-bit identifier in standard CAN.

Note :Only the differences compared to standard frame format are covered here, since the other fields are already covered in the standard frame format.

Substitute Remote Request (SRR) : It substitutes RTR bit in Extended frame in place of standard frame.

It is recessive in case of a Data frame.

Identifier Extension (IDE) : The IDE belongs to Arbitration field in Extended Frame compared to its placing in Control field in Standard Frame.

Its value is Recessive in Extended Frame format.

4. What is the use of Remote Frame in CAN Protocol?

The remote frame is used to request transmission of specific data frame. Since remote frame contains the request and data frame contains the actual data that has to be transmitted.

The remote frame and data frame have the same identifier.

5. What is the difference between remote frame and data frame in CAN protocol?

The remote frame is used to perform actual request for data and doesn’t contain any data but the data frame is used to transmit the data and contains the actual data.

In Remote frame the RTR is Recessive and in the Data frame the RTR bit is Dominant.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like