Embedded System - Frequently asked interview question and answer

Basic Embedded Interview Questions, CAN Interview Questions, Automotive Interview Questions, I2C and SPI Interview Questions, Embedded C interview Questions, Autosar Interview questions,

Here are some frequently asked Embedded Interview Questions :
1.What is an embedded system?

An embedded system is system that has embedded software and computer hardware which makes it a system dedicated for

  • an application
  • specific Part of an application or product
  • part of larger system

Embedded system are those where the CPU + system is self contained and control all the inputs and outputs by itself

2.What are the types of embedded system?

They are of 4 types

  1. General computing
  2. Control System
  3. Signal Processing
  4. Communication and network
3.What are the components of embedded system?
  1. Microcontroller
  2. Microprocessor
  3. DSC
  4. DSP
  5. Busses
  6. System clock
  7. Read only Memory(ROM)
  8. Random access memory(RAM)
  9. Real time clock
4.Why we use embedded systems?

Embedded systems avoid lots of electronic components and they have rich built in functionality. They reduces the cost and maintenance cost and the probability of failure of embedded system is less so embedded system are in very much use now a days.

5.What are the languages used in embedded system?

Assembly language and C are basically used for embedded system. Java and ADA are also preferred

6.What are the characteristics of embedded system?

The Characteristics of the embedded systems are as follows

  1. Sophisticated functionality
  2. Real time behavior
  3. Low manufacturing cost
  4. Low power consumption
  5. User friendly
  6. Small size
7.When do we use a volatile keyword?

When a compiler changes its behavior unexpectedly after optimization, a volatile keyword is used.

8.What is interrupt latency?

It is the time taken by ISR to respond to an interruption. Less latency means a faster response to the interrupting event.

9.What is a RISC architecture?

RISC architecture means Reduced instruction set computer architecture. It is a type of microprocessor architecture utilizing a small and highly optimized set of instructions to compute tasks in the least amount of time.

10. What is a memory leak?

When the developers create objects or use the memory to help memory and then forget to free it before completing the program, a memory leak occurs. This leads to reduced memory availability and often crashes of the application.

11. Two-wire interface is also known as _________

a) UART

b) SPI

c) I2C

d) USART

Answer: c

Explanation: The i2c protocol also recognized as the two-wire interface that is a simple serial communication protocol that uses just pins of a microcontroller namely SCL and SDA.

12. Why embedded systems?

As we all know it's a combination of hardware and software.

It helps to achieve a real-time embedded system with considering factors like speed and efficiency.

13. Why embedded applications are real-time?

An embedded system is a dedicated electronics design system which is used to control and access data within a given response time to handle critical events. In RTOS time responsiveness is fast and it maintains scalability.

14. What is mean by an infinite loop in embedded systems?

As it works on real-time embedded systems applications which used to repeatedly monitoring/processing status of the program.

15. What is big-endian and little-endian format in embedded systems?

The big-endian means data is stored at the big end first. In multiple bytes, the first byte is the biggest or represents the primary value but

In the little endian format, little end data stored first.

16. What are commonly found errors in embedded systems?

Wrong addressing of address lines and data lines within a circuit.

Transient current and static charges which damages memory devices.

Illegal memory allocation.

Wrong insertion of Memory devices into memory slots.

Sometimes control signals are faulty.

17. Why I/O Devices are important in embedded systems?

As we know embedded systems have inbuilt on a single chip which contains peripherals, memory and communication protocols like I2C, SPI CAN. While communicating and interchanging contents with these devices require physical entities.

So to receive and send contents on device/computer I/O device functionality can be used by embedded applications.

18. What is microcontroller and why?

Microcontroller is an electronic device which controls I/o devices and has own CPU which contains peripherals, memory, and processor which can be used as embedded systems. The execution time of microcontrollers works in microseconds which give the output of particular embedded applications in specific time duration.

19. What is the difference between microprocessor and microcontroller?

Microprocessor is a device in which memory, peripherals, and I/O devices connected externally. The microcontroller has I/O, memory,& Peripherals inbuilt into it and designed for control.

20. In I2C, SPI and CAN which one is best?

Don't give an answer to the interviewer that is best. As per industry requirement and project need all three are best. Every protocol has its unique quality to show performance in industry project.

21. List various timers in embedded systems?

Time Slicing, Time Division, Capture, and Compare Timer.Timer/Counter

22. Why Timers?

Timer is not only used to generate delay but used to count pulses. Timers maintain accuracy as per requirement. By using for loop we can generate delay but will not get accuracy as per requirement. Timers maintain accuracy and precise value. Timer calculation can be done by an external clock and controller itself.

23. Are Smart devices embedded systems?

No, Smart devices are not embedded systems but it contains several embedded systems like Wifi, Bluetooth, GSM Modules.

24. Why interrupts are prioritized?

Interrupts selection based on two criteria:

The execution time of the device driver's interrupts.

Maximum interrupt latency requirement.

Worked on the basis of timer overflow. Once that cannot be serviced within the time limits specified for bus interrupts qualify as off-level interrupts. A device's interrupt priority is picked on two criteria: it's maximum interrupt latency requirements and the device driver's interrupt execution time.

25. What is the use of model transformation in embedded?

Model transformation basically used to obtain different views for embedded project development. It provides a Bottom-up and top-down approach. It helps to construct the iterative model by using library components which involve analysis of the model so that the process can be made automated.

26. What is the use of DMA in embedded systems?

DMA means Direct Memory Access controller which handles dynamic memory allocation and allow data to be transferred between devices. I/o Devices data can be detected and communicated automatically. Data transfer between two devices can be done by an interrupt. DMA provides high-quality performance and is used to execute overall execution in the system.

27. What are the parameters required to design device drivers?

1:- Structure: Synchronous entry and asynchronous entry. Several synchronous entries handle device initialization, queue I/O Request, state control, read/write/. and aSynchronous entry point handles interrupt

2:- OS and driver Communication:-buffers, error codes.

3:- Driver operations: Initialize required devices.

4:-Interpret commands.

# Schedule multiple outstanding requests

# Manage data transfer

# Accept and process interrupt.

#. Support Functions: Support open, close, read, write, and seek functions.

28. What do you mean by reading modify write mechanism?

It is used to access microcontroller ports.

All three actions performed by single instructions.

Initially, data read by port and again written back to port.

29. Why startup code is required in embedded applications?

It is a prior and basic platform to run applications. It Contains assembly language to run the application. There are some parts need to execute startup code:

  • Exception handler code
  • Reset handler
  • stack declaration
  • Vector table allocation.
31. What are the steps to measure interrupt latency in embedded systems:

Configure one I/O Pin to generate interrupt and second I/O pin for toggling. Monitor pin to generate an interrupt. Monitor second pin which is toggled at the start of the interrupt service routine. Once interrupt is generated a signal of both pins will change.

32. Is an Embedded system is IoT?

We can say embedded applications are sub-set of IoT. IoT is a network connects with an object which is used to collect and exchange data and that object is nothing but your embedded devices and applications.

33. Why embedded is known as Automotive?

Embedded applications or devices is a system which is used to design & control, access the data in electronics-based systems. These embedded based applications can be used in automotive cars to access different functionalities like powertrain, infotainment, security, and audio systems. Application is changing according to OEM requirements.

34. Why embedded applications are programmed? & How?

Computer understands machine level language. Also, an embedded system is a mechanical system with a dedicated role which has larger no of electrical and mechanical objections, it happens with real-time computing. Embedded device or systems include hardware and mechanical parts and used to control many devices in today's world.

35. Why "c" language mostly preferred than assembly language?

Embedded applications need portability. By writing assembly code doesn't maintain the required portability and accuracy in functions. but by writing code in " C " is more scalable, reliable and portable and easy to understand.