Embedded & Real-Time
Microcontrollers, RTOS, timing โ robots in real time.
Why it matters in robotics
Robotics runs on embedded controllers, so interviewers probe whether you understand what happens beneath the high-level stack: how an interrupt preempts your loop, why a timer ISR must stay short, and how an RTOS scheduler decides which task runs next. Expect questions on real-time determinism (worst-case latency and jitter, not average throughput), priority inversion and how a mutex with priority inheritance fixes it, and the tradeoffs between CAN, I2C, SPI, and UART for connecting sensors, motor drivers, and microcontrollers. Many roles ask you to reason about a missed deadline: was it ISR latency, a blocking call in a high-priority task, or bus contention? You may also get a quick numerical sizing question (baud rates, bus bandwidth, timer reload values, control-loop period). Demonstrating that you think in terms of bounded latency, preemption, and shared-resource contention separates embedded-fluent candidates from those who only know application-level code.
Application focus
The same topic, tailored to the robot you're building. Your choice is remembered across the roadmap and every topic.
At a glance
How a periodic control loop runs under an RTOS: a hardware timer interrupt drives the scheduler tick, which preempts lower-priority work to run the high-priority control task on time.
What to study
- โPolling (fixed-rate) vs. interrupt-driven (event-based) I/O โ the fundamental tradeoff in latency, CPU cost, and determinism โ plus ISR latency, keeping ISRs short, volatile/shared-data hazards, and hardware timers for periodic control loops and PWM.
- โRTOS scheduling: fixed-priority preemptive scheduling, round-robin time-slicing, priority inversion and priority inheritance, jitter, and choosing task priorities for a control loop.
- โReal-time determinism: hard vs soft deadlines, worst-case execution time and latency, sources of jitter, and how to budget a periodic loop so it never misses its deadline.
- โCommunication buses: CAN (arbitration, differential, multi-node), I2C (addressing, multi-device, pull-ups), SPI (full-duplex, chip-select, speed), and UART (async, framing) โ and when to pick each.
Study by time budget
Pick the path that fits the time you have before your interview.