Communication Protocols Interview (60 Questions)

 

Section A – UART (1–8)

1.

Explain UART architecture.


2.

Difference between:

  • UART
  • USART

3.

Explain UART frame format.

Include:

  • Start bit
  • Data bits
  • Parity
  • Stop bit

4.

What is baud rate?

How is it calculated?


5.

Difference between:

  • Hardware Flow Control
  • Software Flow Control

6.

How would you debug UART communication using an oscilloscope?


7.

Common reasons for UART framing errors.


8.

A UART communication works at 9600 baud but fails at 115200 baud.
How would you debug it?


Section B – SPI (9–18)

9.

Explain SPI architecture.


10.

Difference between:

  • SPI Master
  • SPI Slave

11.

Explain SPI signals:

  • MOSI
  • MISO
  • SCLK
  • CS

12.

Explain SPI Modes:

  • Mode 0
  • Mode 1
  • Mode 2
  • Mode 3

13.

Difference between:

  • Full Duplex
  • Half Duplex

14.

How do multiple SPI slaves share one bus?


15.

How would you debug SPI using a logic analyzer?


16.

SPI data corruption occurs occasionally.
Possible reasons?


17.

Maximum practical SPI speed limitations.


18.

Compare SPI with UART.


Section C – I²C (19–28)

19.

Explain I²C architecture.


20.

Explain:

  • SDA
  • SCL

21.

Difference between:

  • 7-bit
  • 10-bit addressing

22.

What is Clock Stretching?


23.

Explain:

  • ACK
  • NACK

24.

Explain repeated START.


25.

How do multiple masters work in I²C?


26.

What is arbitration?


27.

How would you debug an I²C bus stuck LOW?


28.

Compare I²C and SPI.


Section D – CAN (29–38)

(Very Important for You)

29.

Explain CAN architecture.


30.

Difference between:

  • Classical CAN
  • CAN FD

31.

Explain CAN frame format.


32.

Explain CAN Arbitration.


33.

How does CAN error detection work?

Explain:

  • CRC
  • ACK
  • Stuff Error
  • Form Error
  • Bit Error

34.

What is Bus-Off?

How does recovery happen?


35.

Explain Error Active, Error Passive and Bus-Off states.


36.

Difference between:

  • Standard Identifier
  • Extended Identifier

37.

A node suddenly goes Bus-Off.
How would you debug it?


38.

How would you troubleshoot intermittent CAN communication failures in an Automotive ECU?


Section E – LIN (39–42)

39.

Explain LIN architecture.


40.

Difference between:

  • LIN
  • CAN

41.

Explain LIN frame format.


42.

When should LIN be preferred over CAN?


Section F – Ethernet & TCP/IP (43–50)

43.

Explain Ethernet architecture.


44.

Difference between:

  • Hub
  • Switch
  • Router

45.

Explain:

  • MAC Address
  • IP Address

46.

Explain the TCP/IP stack.


47.

Difference between:

  • TCP
  • UDP

48.

Explain the Three-Way Handshake.


49.

How would you debug packet loss?


50.

Difference between Automotive Ethernet and Classical Ethernet.


Section G – USB (51–54)

51.

Explain USB architecture.


52.

Difference between:

  • USB Host
  • USB Device
  • USB OTG

53.

Explain USB Enumeration.


54.

Why is USB considered host-controlled?


Section H – Advanced Protocols (55–60)

55.

Compare:

  • UART
  • SPI
  • I²C
  • CAN
  • LIN
  • Ethernet

When would you choose each?


56.

You have to connect:

  • EEPROM
  • Temperature Sensor
  • Display
  • CAN Controller
  • GPS Module

Which communication protocol would you choose for each and why?


57.

Design the communication architecture for an Automotive ECU that includes:

  • CAN
  • Ethernet
  • SPI Flash
  • I²C Sensors
  • UART Debug Port

Explain the data flow and rationale.


58.

Your ECU communicates with another ECU over CAN and an external diagnostics tool over Ethernet. A firmware update occasionally fails. How would you determine whether the issue is in the transport layer, application layer, or physical layer?


59.

A sensor connected over SPI occasionally returns corrupted data only when CAN traffic is high. What could be the possible causes, and how would you debug this issue?


60.

Compare the communication protocols you have used in your projects. Discuss their advantages, limitations, bandwidth, latency, hardware complexity, and typical automotive use cases.


Coding Questions (Frequently Asked)

  1. Write a UART driver.
  2. Implement SPI read/write functions.
  3. Implement I²C EEPROM read/write.
  4. Write a CAN transmit function.
  5. Design a CAN receive ISR.
  6. Calculate CAN bit timing for a given baud rate.
  7. Implement a ring buffer for UART reception.
  8. Develop a protocol parser for a custom serial protocol.
  9. Implement CRC calculation for a communication packet.
  10. Write a simple TCP client for an embedded Linux system.

Debugging Scenarios (Most Frequently Asked)

Scenario 1

The UART console prints random characters during boot. How would you troubleshoot this?

Scenario 2

An SPI flash works correctly at 5 MHz but fails at 50 MHz. What are the likely causes?

Scenario 3

The I²C bus becomes permanently busy after a power glitch. How can software recover from this condition?

Scenario 4

A CAN node repeatedly enters the Bus-Off state after a firmware update. How would you identify the root cause?

Scenario 5

Ethernet link comes up successfully, but communication between ECUs is intermittent. What layers would you investigate?

Scenario 6

A USB device is not detected by the host after connecting the cable. Describe your debugging approach.

Scenario 7

A LIN slave occasionally misses the master's header. What factors could cause this?

Scenario 8

An Automotive Ethernet camera experiences dropped frames only under heavy network traffic. How would you analyze the issue?

Scenario 9

Your ECU uses CAN for real-time control and Ethernet for diagnostics. How would you ensure that Ethernet traffic does not affect CAN timing?

Scenario 10

You are asked to select communication protocols for a new automotive ECU supporting sensors, actuators, diagnostics, OTA updates, and infotainment. Explain your protocol choices and justify the trade-offs.

Comments