Embedded Systems Interview 2026: 30+ Real-Time, Hardware-Software Integration Questions

Embedded systems interviews are different from most software engineering interviews. The LeetCode prep helps a little, but not as much as you’d hope. A lot of what actually comes up in these interviews is closer to “explain what volatile does and why the compiler can’t optimize around it” than “reverse a linked list.”

Here are the questions that come up most consistently, with honest answers and a note on where candidates usually get tripped up.

C and memory: the questions that filter the most candidates

Most embedded roles require C or C++. If you’re interviewing for a position that involves bare-metal or RTOS work, expect at least 3 to 4 questions in this area.

1. What does volatile mean, and when do you use it?

The short version: volatile tells the compiler not to optimize reads or writes to that variable, because something outside the program’s normal execution (a hardware register, an interrupt service routine, or another thread) may change it.

Where candidates stumble: saying “volatile means the variable can change” without explaining the compiler optimization angle. The compiler might otherwise cache the value in a register and skip the memory read. That’s the problem volatile solves.

2. Stack vs. heap: when does each matter?

Stack allocations are automatic (function-scope variables), fast, and bounded at compile time. Heap allocations via malloc or new are dynamic and can fragment over time. In a lot of embedded systems, heap allocation is either forbidden or used very carefully because fragmentation in a long-running system can cause hard-to-reproduce failures.

If the interviewer follows up with “what happens when you call malloc on a device with 8KB of RAM,” the answer they want involves discussing memory exhaustion, the return value of malloc being NULL, and why you might use a static memory pool instead.

3. What is memory alignment and why does it matter?

Most processors require (or strongly prefer) data to be aligned to its natural size: a 4-byte integer at an address divisible by 4, an 8-byte double at an address divisible by 8. Misalignment can cause bus faults on some architectures or performance penalties on others. In C, compilers handle this automatically for most cases, but it comes up when you’re casting between types or working with packed structs.

4. What is a circular buffer and how do you implement one?

A circular buffer (or ring buffer) is a fixed-size buffer that wraps around when the write pointer reaches the end. Head and tail pointers track where to read and write. The usual implementation uses a power-of-two size so that modulo wrapping can be done with a bitwise AND. This question comes up a lot because circular buffers are one of the most common data structures in embedded comms code.

Microcontrollers and hardware interfacing

This section varies a lot by role. An automotive firmware role will go deep on CAN bus. An IoT sensor role might focus on ADC and power management. Know what the company makes and prepare accordingly.

How do you configure a GPIO pin?

The answer involves setting the pin direction (input or output), configuring pull-up or pull-down resistors where needed, and sometimes configuring alternate functions (UART TX, SPI CLK, etc.) through the pin’s multiplexer. Interviewers usually want to see that you understand the peripheral register configuration even if you normally use a HAL to do it.

What is PWM and how is it typically generated?

Pulse-width modulation generates a signal with a fixed frequency but variable duty cycle. A timer peripheral counts up to a period value and compares against a threshold to drive the pin high or low. The duty cycle is the ratio of the high time to the total period. Common uses: motor control, LED dimming, servo positioning.

What are watchdog timers for?

A watchdog timer resets the processor if the firmware doesn’t kick (reset) the watchdog within a set window. It’s a self-recovery mechanism for software hangs or lockups. Interviewers asking this want to know you understand fault recovery, not just normal-path operation.

RTOS and real-time systems

These questions come up heavily for roles involving any kind of preemptive scheduling. FreeRTOS experience is the most commonly cited on job posts, but the concepts transfer to ThreadX, Zephyr, and others.

What’s the difference between a semaphore and a mutex?

A mutex is for mutual exclusion: only the task that took the mutex can release it, and it typically includes priority inheritance to prevent priority inversion. A binary semaphore is a signaling mechanism: one task can signal another task to proceed, and there’s no ownership concept. Using a semaphore where you meant a mutex is a common source of priority inversion bugs.

What is priority inversion?

Priority inversion happens when a high-priority task waits on a resource held by a low-priority task, while medium-priority tasks preempt the low-priority task and effectively block the high-priority task from running. The Mars Pathfinder mission in 1997 had a famous priority inversion bug that caused periodic system resets. Mention that if you want to impress someone.

How does context switching work?

The RTOS saves the current task’s CPU registers and stack pointer to its task control block, loads the next task’s state, and jumps to where that task left off. On ARM Cortex-M, this typically happens in the PendSV interrupt handler. Interviewers asking this want to know you understand what the scheduler is actually doing, not just how to call vTaskCreate.

Interrupts and timing

What should you avoid doing inside an ISR?

Blocking operations: anything that waits. That includes printf, most dynamic memory allocation, and any OS call that might block. The standard pattern is to set a flag or post to a queue inside the ISR and handle the actual work in a task. This keeps ISR latency low and avoids re-entrancy problems. The BLS Occupational Outlook for embedded and firmware roles projects steady growth through 2032, which tracks with the fact that more hardware is getting smarter, not less.

What is interrupt latency?

The time from when an interrupt fires to when the first instruction of the ISR executes. It includes pipeline stall time, register saving, and interrupt controller processing. In real-time systems you often have hard bounds on this, and understanding the sources of latency is part of system design.

Communication protocols

Know the basics of I2C, SPI, and UART, and have a feel for when you’d choose each. CAN bus matters for automotive. USB matters for device-class firmware. The 2024 Stack Overflow Developer Survey shows embedded C/C++ as a consistently in-demand skillset, and protocol knowledge is a big part of what distinguishes mid-level from senior candidates in job postings.

I2C vs. SPI: the real trade-offs

I2C uses two wires (clock and data), supports multiple devices on the same bus via addressing, and tops out around 3.4 Mbps in high-speed mode. It’s simpler to wire up but more complex in software because of the addressing, acknowledge bits, and potential for bus contention. SPI uses 4 wires (or more for multiple devices) and is faster and simpler electrically, but requires a separate chip select line per device and doesn’t have a built-in ack mechanism.

I tend to reach for SPI when speed matters and the device count is low. I2C when you’re connecting many sensors to a constrained pin count. That’s a rough heuristic, not a rule.

One thing most candidates underestimate

Debugging stories. Almost every senior embedded interview includes a question like “tell me about a hard bug you tracked down.” The answer they’re looking for isn’t a triumphant story about finding the bug. It’s a story that shows your debugging process: what you hypothesized, what you ruled out, what tools you used (JTAG, logic analyzer, oscilloscope, print statements via UART), and where you were wrong before you were right. Candidates who can describe a real debugging process in specific detail, especially one where their first assumption was incorrect, tend to stand out a lot more than candidates who just know the textbook answers.

Leave a Comment

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

Scroll to Top