knaxuslearn · build · ship

Roadmaps / STM32 / Interview topics

Reference

Interview topics

Each question has the follow-up an interviewer might ask and what a Staff answer adds; each phase adds a Principal probe and a design prompt. A good design answer names the budget, the failure that matters, the measurement and the rollback.

Phase 1

QuestionFollow-upStaff adds
What happens between reset and main?What if .bss is not cleared?Why the order of clock and RAM init matters for the first fault
How do you measure interrupt latency without a scope?What does the DWT counter miss?Treat it as a distribution, state the worst case and how many samples it rests on
Why trigger an ADC from a timer?What if two ADCs must sample together?Name the jitter budget and how it maps to measurement error
volatile, atomic and barrier: when each?What breaks on a Cortex-M4 with an ISR?Why single-core still needs care with DMA
DMA or interrupt per sample?When is DMA worse?Cost of the extra DMA bus traffic and of debugging it

Principal probe: how do you make timing evidence a release gate across 20 products without every team building its own harness?

Design prompt (30 minutes): firmware for an 8-channel data logger sampling at 50 kHz for an hour to flash. Outline buffers, DMA, flash write stalls and what you would measure first.

Phase 2

QuestionFollow-upStaff adds
Control loop in an ISR or a task?What if the loop gets heavier?The budget, the evidence, and the revisit trigger
Explain priority inversion and the fix.Does a mutex fix every case?Bounded blocking, and why inheritance is not enough for chains
Why can ISRs only call FromISR functions?What if the priority is wrong?Make the mistake fail loudly in test (configASSERT)
Float in an ISR on a Cortex-M4F?What is lazy stacking?Fixed-point only when the budget demands it, and proof
Describe anti-windup.How would you test it?Seed the saturation and show the recovery time

Principal probe: when does a loop's worst-case budget become a contract between hardware and firmware teams, and who owns it when it breaks?

Design prompt: firmware for a motor driver with a 20 kHz current loop, a 1 kHz speed loop and a CAN link. Say what runs where, and the budgets.

Phase 3

QuestionFollow-upStaff adds
Design a serial protocol that survives noise.How do you resynchronise?Version it, and plan for an old and a new peer on one bus
CRC, checksum or hash?Which for a bootloader?State what each can and cannot detect, and the attack it ignores
Design the watchdog policy.Who feeds it?Show the safe state when it fires, and the timeout's tolerance
Decode a HardFault.What if the stack is corrupt?What you record so the field decodes it without a debugger
Why can fuzzing a parser on a laptop miss bugs?What does it never test?Timing and hardware faults need the board and a seeded fault

Principal probe: what must every product log at reset so 100,000 devices can be diagnosed, and who owns that schema for five years?

Design prompt: field diagnostics for 100,000 devices. Say what each device records at reset, what leaves it, and how you limit the volume.

Phase 4

QuestionFollow-upStaff adds
Design a power-fail-safe update.List the states.Prove it with a campaign, and say how many cuts and where
Dual-bank swap or copy-based swap?What does each need from the chip?Cost of an option-byte write in the update path
CRC or signature?Where does the key live?Rotation, revocation, and the limits of a part with no secure boot
When does a trial image become permanent?What if the self-test is wrong?A confirm rule tied to what a customer notices
How do you know an update bricked nothing?What do you log?Staged rollout with abort criteria

Principal probe: how do you update the bootloader itself, which readout and write protection settings does the fleet ship with, and who holds the signing key when the person who set it up leaves?

Design prompt: over-the-air updates for 50,000 devices on an unreliable link. Outline staging, abort criteria and what you measure.