SkillDzire
Embedded Systems
Interview Questions
1. What is an embedded system?
An embedded system is a combination of hardware and software designed for a specific
function within a larger system, like a microwave oven, washing machine, or a pacemaker.
2. Give some examples of embedded systems.
Smartphones, washing machines, digital cameras, smartwatches, automotive ECUs,
printers.
3. What are the major components of an embedded system?
• Microcontroller or Microprocessor
• Memory (RAM/ROM/Flash)
• Input/output interfaces
• Sensors and actuators
• Embedded software
4. What is the difference between a microcontroller and a
microprocessor?
A microcontroller has CPU, RAM, ROM, I/O ports on a single chip, while a
microprocessor has only the CPU, requiring external components.
5. What is real-time operating system (RTOS)?
An RTOS ensures tasks are executed within strict timing constraints. Used in systems like
airbag controllers or pacemakers.
6. What is the difference between hard and soft real-time
systems?
• Hard RTOS: Missing a deadline is catastrophic (e.g., airbag system).
• Soft RTOS: Occasional deadline misses are acceptable (e.g., video streaming).
7. What languages are commonly used in embedded systems?
C (most popular), C++, Assembly, Python (for scripting/testing), Embedded Rust.
8. What is a watchdog timer?
A hardware timer that resets the system if the software hangs or becomes unresponsive.
9. What is memory-mapped I/O?
Peripheral devices are mapped into the address space of the processor, allowing them to be
accessed like regular memory.
10. What is the function of the bootloader?
It initializes hardware and loads the main firmware or operating system during system
startup.
11. What are the types of memory used in embedded systems?
• ROM (e.g., Flash, EEPROM)
• RAM (e.g., SRAM, DRAM)
• Cache (L1, L2)
• Non-volatile memory (for data retention)
12. What is the difference between ISR and thread?
An ISR (Interrupt Service Routine) handles hardware interrupts, runs asynchronously, and
can't be preempted by threads.
13. What is polling vs interrupt?
• Polling: Continuously checking status (CPU-intensive).
• Interrupt: Asynchronous signal to processor, efficient and real-time.
14. What is context switching?
Switching the CPU from one task/thread to another, saving and restoring state information.
15. What is a semaphore?
A synchronization tool used to control access to shared resources in multitasking systems.
16. What is DMA (Direct Memory Access)?
A controller that transfers data between memory and peripherals without CPU intervention.
17. What is volatile keyword in embedded C?
Tells the compiler that a variable can change at any time (e.g., registers, memory-mapped
I/O), preventing optimization.
18. What is debouncing in embedded systems?
Eliminating false signals due to mechanical switch bouncing using software or hardware.
19. What is the role of timers in embedded systems?
Used for delays, generating waveforms (PWM), measuring time intervals, and task
scheduling.
20. What is SPI and how is it different from I2C?
• SPI: Full-duplex, 4-wire protocol, faster.
• I2C: Half-duplex, 2-wire, supports multiple devices on the same bus.
21. What is a memory leak and how do you prevent it?
It occurs when memory is allocated but not released, reducing system resources. Use static
analysis tools and proper memory management.
22. What are embedded Linux systems?
Linux OS customized for embedded devices (e.g., Raspberry Pi, routers, automotive
dashboards).
23. What is interrupt latency?
The time between an interrupt being triggered and the ISR starting execution.
24. Explain priority inversion.
A low-priority task holds a resource needed by a high-priority task, causing delays.
25. How can you reduce power consumption in embedded
systems?
Use sleep modes, reduce clock frequency, optimize code, and use low-power hardware
components.
26. What is CAN protocol and where is it used?
Controller Area Network – used in automotive and industrial systems for robust, multi-
master communication.
27. What is a finite state machine (FSM)?
A design pattern where a system is modeled as a finite number of states and transitions.
Widely used in embedded systems.
28. What is the use of UART?
Universal Asynchronous Receiver/Transmitter – a serial communication protocol for
device-to-device data exchange.
29. What are common debugging tools for embedded systems?
Oscilloscope, logic analyzer, JTAG debugger, GDB, serial console, Segger J-Link.
30. What is embedded firmware?
Software that runs on embedded hardware, usually written in C/C++ and stored in non-
volatile memory.
31. How do you debug an embedded system that’s not booting?
Check power supply, clock, reset line, firmware via UART, and use JTAG to step through
bootloader.
32. What steps do you follow to optimize embedded code?
Code profiling, loop unrolling, using efficient data types, minimizing floating-point ops,
using lookup tables.
33. How do you test embedded systems without hardware?
Use software simulators/emulators, virtual platforms, unit tests, and hardware abstraction
layers.
Let’s Learn and Grow