Skip to content
Tech Interview Prep

Embedded Systems Engineer Interview Prep

Overview

Builds and owns firmware for microcontrollers and real-time embedded products: drivers, interrupt and task timing, and the memory and power budgets that decide what ships.

Curated: · Written: · Reviewed:

Interview Q&A
106
Practice MCQs
100

The role in one line

Owns the firmware between the silicon and the product: drivers, interrupt and task timing, and the flash and RAM budgets that decide what ships.

The interview loop

RoundWhat it scores
Technical screenEmbedded C semantics: volatile, alignment, packing, undefined behavior, integer wrap
Hardware to firmwareDatasheet and schematic read into a driver; the fault path when the peripheral stays silent
Timing and RTOSDeadline budget; the race or inversion named before the fix; jitter sources
Debug and reliabilityMap file, fault decode, watchdog policy, reset-cause retention
Memory, power and updateStack and heap numbers, sleep wake cost, bootloader and rollback boundary
Systems reviewTradeoffs with figures, and the test or trace that proves them

Five must-know areas

  • Interrupt and task timing: worst-case latency, critical section length, priority inversion through a shared mutex.
  • Memory-mapped I/O: volatile versus barriers, read-modify-write on live registers, reserved bits kept at reset.
  • Memory budgets: linker map totals, stack high-water marks, no heap in ISRs, DMA cache maintenance.
  • Boot and update: vector table placement, image validation before the jump, rollback when the new image faults.
  • Power and reliability: wake latency, watchdog ownership, what survives a reset in .noinit.

Numbers and formulas to have ready

State the budget before the design. ISR load on one core:

UISR=firq⋅CworstfCPUU_{\text{ISR}} = f_{\text{irq}} \cdot \frac{C_{\text{worst}}}{f_{\text{CPU}}}

At 10 kHz on a 168 MHz core, each interrupt gets 16,800 cycles. A hypothetical 4,000-cycle worst path takes about 24 percent of the CPU before any task runs, so I would check the worst-case nesting before I accept it.

Image fit, with .data initializers stored in flash:

S.text+S.rodata+S.data≤524,288 bytes (512 KiB)S_{\text{.text}} + S_{\text{.rodata}} + S_{\text{.data}} \le 524{,}288\ \text{bytes (512 KiB)}

Task stack sizing:

Stask≥Speak+SISR,nest+SmarginS_{\text{task}} \ge S_{\text{peak}} + S_{\text{ISR,nest}} + S_{\text{margin}}

USART divisor with 16x oversampling (the default on classic USART; check the reference manual for your part):

USARTDIV=fPCLK16⋅baud\text{USARTDIV} = \frac{f_{\text{PCLK}}}{16 \cdot \text{baud}}

Wrap-safe deadline test, unsigned subtraction read as signed:

(int32)(now−deadline)≥0(\text{int32})(\text{now} - \text{deadline}) \ge 0

Reference architecture

Reset: vector table at VTOR ISR: clear flag, copy to queue Driver task: state machine DMA buffer with cache maintenance Supervisor: watchdog refresh on checked tasks Reset cause kept in noinit

Strong vs weak answers

TopicStrong answer sounds likeWeak answer sounds like
Volatilevolatile stops the compiler caching the read; bus ordering still needs a barrier or a dependent readvolatile makes it thread-safe
Stack overrunMPU guard region faults on write; high-water mark read from the fill pattern; worst call depth statedjust make the stack bigger
12 words of headroom12 words is 48 bytes on a 32-bit core; I need worst-case call depth and ISR nesting before I shipyes, it has headroom
ISR timingat 10 kHz the budget is 16,800 cycles at 168 MHz; here is the worst path against itit should be fast enough
Overrun clearon F4 the ORE flag clears by reading SR then DR, not by writing zero to SRI write SR to clear everything
Malloc in ISRheap lock can block; the ISR has no bounded time; a static ring buffer sized from line rateit usually works
Reserved bitsI read the register, change only my fields, and write back the reserved bits as readI OR in all ones for future use

Interview tips

  1. State the clock and the cycle budget before writing any code.
  2. When a register misbehaves, name the rule it broke (reserved bits, read-clear sequence, clock enable before access) before proposing a fix.
  3. Put a number on stack and heap, and say where the worst case comes from.
  4. Close each answer with the trace or test: logic analyzer capture, map file diff, MPU fault, decoded HardFault.
  5. Name the option you rejected and the figure that rejected it.

Last-week checklist:

  • Re-derive the 512 KiB flash fit from a real map file.
  • Decode a HardFault by hand from CFSR, HFSR and the stacked PC.
  • Write USART and SPI init from the reference manual, not from memory.
  • Answer 10 Top 100 Q&A questions aloud, assumptions first.
  • Run the Practice MCQs on volatile, alignment and interrupt masking.
  • Walk the Concepts in study order and stop at any you cannot draw from memory.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.