Embedded systems interview questions and answers for hardware-software roles
Embedded systems interview questions test whether you can reason about a whole device, not just its code: how a microcontroller differs from an application processor, how interrupts, timers, ADCs and DMA move data, which serial bus fits a job, how a real-time scheduler meets deadlines, and how the product survives brownouts, lockups and years on a battery. Expect concept questions, back-of-the-envelope timing math, and design scenarios such as a battery-powered sensor or a motor control loop. Good answers connect hardware limits to software choices.
By Evin JohnPublished 8 min read
How embedded systems questions differ from embedded C questions
An embedded system is a computer built into a product to do one job: a thermostat, a pump controller, an engine module, a wearable. System-level interviews care about how the parts fit: processor, memory, peripherals, buses, power and the software architecture on top. They are common in electronics, automotive, industrial, medical device and consumer hardware companies, and for graduates from electronics and computer engineering programs. Language-level questions such as volatile and integer promotion are on embedded C interview questions; boot, bootloaders and updates are covered in depth for firmware engineers.
- FundamentalsArchitecture, memory, interrupts, peripherals and basic electronics such as pull-ups and drive modes.
- ProtocolsExplain and compare serial buses, read a timing diagram, compute throughput for a link.
- Real-time and RTOSScheduling, priorities, synchronization and how you prove deadlines are met.
- System designDesign a device end to end from a short brief, with power, reliability and test in mind.
Embedded systems fundamentals questions
| Question | What it tests | What a strong answer shows |
|---|---|---|
| Microcontroller versus microprocessor? | Architecture | A microcontroller puts CPU, flash, RAM and peripherals on one chip and runs bare metal or an RTOS. A microprocessor or application SoC needs external memory, usually has an MMU and runs an operating system such as Linux. |
| Harvard versus von Neumann architecture? | CPU design | Separate buses for instructions and data versus one shared bus. Many MCUs use a Harvard-style core with a unified address map, so code can still read constants from flash. |
| Flash, RAM and EEPROM: what goes where? | Memory | Code and constants in flash, variables and stacks in RAM, and small settings that must survive power loss in EEPROM or a reserved flash area, written with wear in mind. |
| Bare metal, RTOS or embedded Linux? | Software stack | Bare metal for simple, tight loops; an RTOS when several timed activities must share the CPU; Linux when you need networking stacks, file systems or a rich UI and can afford the memory, boot time and power. |
| Polling versus interrupts? | Event handling | Polling is simple and predictable but wastes CPU and can miss short events. Interrupts react quickly and let the CPU sleep, at the cost of concurrency bugs. |
| What is interrupt latency? | Timing | The time from the hardware event to the first instruction of the handler: finishing the current instruction, saving context, and any time interrupts are disabled elsewhere. Long critical sections make it worse. |
| What does a watchdog timer do? | Reliability | It resets the system unless software refreshes it in time. Refresh it only where the system has proved it is healthy, not from a timer interrupt that keeps running when the main loop has hung. |
| Push-pull versus open-drain output? | Electronics | Push-pull drives both high and low. Open-drain only pulls low and needs a pull-up resistor, which lets several devices share a line, as I2C does. |
| Why does a floating input cause trouble? | Electronics | An unconnected input picks up noise and reads random values, and can increase power draw. Use internal or external pull-up or pull-down resistors. |
| What sets an ADC's useful precision? | Analog | Resolution in bits, the reference voltage, noise and sampling rate. Sample faster than twice the highest frequency of interest (Nyquist) and filter before the ADC to avoid aliasing. |
Peripherals and serial bus questions
| Bus | Wires and topology | Points to make in an answer |
|---|---|---|
| UART | TX and RX (plus ground), point to point, no shared clock | Both sides must agree on baud rate and frame format. With 8N1 framing each byte takes 10 bit times, so 115200 baud carries about 11,520 bytes per second. |
| SPI | Clock, MOSI, MISO and one chip select per device | Full duplex and fast, no addressing or acknowledgment. Clock polarity and phase (the SPI mode) must match the device's datasheet. |
| I2C | Two open-drain lines with pull-ups, many devices by address | Fewer pins and built-in acknowledgments, but slower and sensitive to bus capacitance and pull-up values. A slave can stretch the clock. |
| CAN | Differential pair, multi-master bus | Message ids decide priority through bitwise arbitration, with strong error detection and fault confinement, which is why vehicles and industrial systems use it. |
| USB, Ethernet | Higher-level links | Much more bandwidth and more software stack. Often provided by a vendor library or an RTOS middleware component. |
- How does PWM control a motor or LED brightness? A timer switches the output on and off at a fixed frequency; the duty cycle sets the average power. Frequency is chosen above audible range for motors and high enough to avoid visible flicker for LEDs.
- What is DMA and when do you use it? A controller that moves data between peripherals and memory without the CPU, for example filling a buffer from the ADC or feeding a UART. The CPU is told when a block is done, which saves cycles and power.
- How do timers measure an input frequency? Input capture records the counter value on each edge; the difference between captures gives the period. For slow signals, count edges over a fixed gate time instead.
- Why debounce a button, and where? Mechanical contacts bounce for a few milliseconds, producing several edges. Debounce in hardware with an RC filter, or in software by requiring a stable reading over a short window.
- What is the difference between level-triggered and edge-triggered interrupts? Level interrupts fire while the line is active and must be cleared at the source; edge interrupts fire on a transition and can be missed if edges come faster than the handler.
- How do you read a datasheet for a new sensor? Electrical limits first, then the interface and timing diagrams, the register map, power-up sequence and errata. Errata often explain the bug you would otherwise spend a week on.
Real-time and RTOS questions
| Question | What it tests | What a strong answer shows |
|---|---|---|
| Hard versus soft real time? | Definitions | Missing a hard deadline is a failure (airbag, motor commutation). Missing a soft deadline degrades quality (a dropped audio frame). |
| How does a preemptive priority scheduler work? | RTOS basics | The highest-priority ready task always runs; a higher-priority task becoming ready preempts the current one at the next scheduling point. |
| What is rate monotonic scheduling? | Priority assignment | Give shorter-period tasks higher priority. For independent periodic tasks there is a utilization bound below which all deadlines are met; above it you check each task with response-time analysis. |
| What is priority inversion? | Synchronization | A low-priority task holds a mutex that a high-priority task needs, and a medium-priority task preempts the low one, so the high one waits indefinitely. Priority inheritance raises the holder's priority until it releases the lock. |
| Mutex versus semaphore? | Primitives | A mutex has an owner and protects a resource, often with priority inheritance. A counting or binary semaphore signals events or counts resources and has no owner, which is why it suits ISR-to-task signaling. |
| How do you pass data from an ISR to a task? | Design | Through an RTOS queue or a lock-free buffer, then a notification or semaphore that wakes the task, using the ISR-safe versions of the API calls. |
| What is jitter and why does it matter? | Timing quality | Variation in when a periodic action happens. Control loops and sampling care about it as much as average timing; long interrupt-disabled sections and priority mistakes cause it. |
| Why might a system use a tickless idle mode? | Power | Instead of waking on every scheduler tick, the RTOS programs a timer for the next needed wake-up, so the CPU can sleep longer. |
import math
# (name, worst-case execution time C, period T) in ms; deadline = period.
tasks = [("sensor", 1, 4), ("control", 2, 6), ("logger", 3, 12)]
tasks.sort(key=lambda t: t[2]) # rate monotonic: shorter period, higher priority
u = sum(c / t for _, c, t in tasks)
n = len(tasks)
bound = n * (2 ** (1 / n) - 1)
print(f"utilization {u:.3f}, Liu-Layland bound {bound:.3f}")
# Exact check: response-time analysis for each task.
for i, (name, c, t) in enumerate(tasks):
r = c
while True:
nxt = c + sum(math.ceil(r / tj) * cj for _, cj, tj in tasks[:i])
if nxt == r or nxt > t:
break
r = nxt
print(f"{name}: worst-case response {nxt} ms, deadline {t} ms, {'ok' if nxt <= t else 'MISSED'}")Interviewers rarely expect the formula from memory, but they like candidates who know the difference between a quick utilization check and proving each deadline, and who ask where the worst-case execution times came from. Measured times from a scope or trace beat estimates.
Power, reliability and debugging questions
- How do you make a sensor node last on a battery? Spend almost all the time in the deepest sleep mode that keeps the needed wake source, wake on a timer or interrupt, do the work fast, and switch off sensors and radios between readings. Then measure the current profile, because average current decides battery life.
- What is clock gating? Turning off the clock to peripherals you are not using, which cuts their dynamic power. Lower core clock speeds help too, but finishing quickly and sleeping is often better.
- What is a brownout and how do you handle it? Supply voltage dropping below safe operation. A brownout detector holds or resets the MCU so it does not run corrupt instructions or half-write flash.
- How do you design a watchdog strategy for several tasks? Each task checks in to a supervisor, and the supervisor refreshes the watchdog only when every task has reported recently. Record the reset cause at startup so field logs show watchdog resets.
- An I2C sensor stops answering and the bus stays low. What do you do? A device is probably holding SDA low mid-transfer. A common recovery is to toggle SCL manually until SDA is released, then send a stop condition; also check pull-up values and add timeouts so the firmware never waits forever.
- What tools do you use to debug on hardware? A debug probe over JTAG or SWD for breakpoints and memory, a logic analyzer for bus traffic, an oscilloscope for signal quality and timing, and a spare GPIO toggled in code to time sections on the scope.
- Why can adding printf make a bug disappear? It changes timing and stack use. Prefer a trace buffer in RAM, a fast logging channel or GPIO toggles for timing-sensitive issues.
- How do you protect a device against bad firmware updates? Keep two image slots, verify the new image's signature and checksum before switching, and roll back automatically if the new image does not confirm it is healthy.
Senior and system design scenarios
| Prompt | What it tests | What to cover |
|---|---|---|
| Design a battery-powered temperature logger that uploads once a day. | Power and architecture | Sleep current budget, sensor choice and interface, storage between uploads, radio choice, timekeeping with an RTC, and what happens if an upload fails for a week. |
| A motor control loop must run every 100 microseconds. | Hard real time | Run it from a timer interrupt or hardware trigger with the ADC synchronized by DMA, keep the computation bounded, measure worst-case time and jitter, and keep slower work in lower-priority tasks. |
| Devices in the field reset a few times a week. | Field debugging | Read the stored reset cause, add a crash log in no-init RAM, look for brownouts during radio bursts, stack overflow and watchdog starvation, and try to reproduce with temperature and supply stress. |
| Choose a microcontroller for a new product. | Trade-offs | Peripherals and pin count, memory with headroom, power modes, toolchain and RTOS support, package, supply availability, security features, and the cost of the whole board rather than the chip alone. |
| The team wants to move from bare metal to an RTOS. | Architecture change | Which timing problems the RTOS solves, memory cost per task, how ISRs and drivers change, and migrating one subsystem at a time with tests around timing. |
| Add a safety requirement to an existing design. | Safety mindset | Identify failure modes, add independent monitoring such as a windowed watchdog or a second check channel, and follow the standard the industry requires, which the employer will name. |
Fictional example
- Interviewer
- A logger reads a sensor every minute and stores the value. The design target was a year on two AA cells, but field units die in about two months. How do you investigate?
- Candidate
- Battery life is set by average current, so I would measure it first: a current probe or a power analyzer on a unit, logging over several wake cycles. I would expect to see whether the problem is sleep current that is too high or active periods that are too long. High sleep current usually means a peripheral or sensor left powered, a floating input, or the MCU not reaching its deepest sleep mode because a clock or debug setting keeps it awake. Long active periods often come from waiting on a slow sensor with the CPU spinning, or flash writes on every reading instead of in batches. Once I find the biggest contributor, I would fix it, measure again, and calculate the new expected life from the measured profile, so the claim rests on numbers rather than the datasheet.
Embedded systems practice plan
- Week 1: fundamentals. Explain each question in the first table out loud in under a minute; sketch an MCU block diagram from memory.
- Week 2: buses. On a development board, talk to one SPI and one I2C device and capture both with a logic analyzer; compute UART throughput for two baud rates.
- Week 3: real time. Build two or three tasks on an RTOS, reproduce priority inversion on purpose, then fix it with a mutex that supports inheritance.
- Week 4: design. Practice two design prompts from the table above, each in 30 minutes, ending with how you would test and measure the result.
For role-specific loops, see embedded software engineer interview questions and IoT engineer interview questions, which add cloud connectivity and device fleets.
System design answers for hardware are judged on whether you measured before you concluded, and it is hard to notice in the moment whether you said so. Natively, an AI interview assistant for Mac and Windows, gives you a transcript of a mock embedded design round, created on your computer, to review afterward. In practice it can read a block diagram, a timing diagram or a scope screenshot and ask follow-up questions, and with Pro or the free trial it can draw on your résumé and the job description you add. Notes from each session stay with it.
Questions people ask
What are common embedded systems interview questions?
Microcontroller versus microprocessor, memory types, bare metal versus RTOS, polling versus interrupts, interrupt latency, watchdogs, UART versus SPI versus I2C versus CAN, priority inversion, low-power design and how you debug on hardware.
What is the difference between SPI and I2C?
SPI uses separate clock, data-in, data-out and chip-select lines, runs full duplex and fast, with no addressing. I2C uses two shared open-drain lines with pull-ups and device addresses, so it needs fewer pins but runs slower.
What is priority inversion in an RTOS?
A high-priority task waits for a mutex held by a low-priority task while a medium-priority task keeps preempting the low one. Priority inheritance fixes it by temporarily raising the holder's priority.
How do I prepare for an embedded systems interview?
Review architecture and peripherals, practice talking to SPI and I2C devices on a development board with a logic analyzer, reproduce priority inversion on an RTOS, and rehearse a design prompt such as a battery-powered sensor end to end.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
