Embedded systems interview questions

33 questions that real embedded software interviews ask, grouped by the lesson that teaches the topic. Read the lesson, then answer out loud.

What is a microcontroller?

  1. What is the difference between a microcontroller and a microprocessor?
  2. Where do the code and the variables live in an MCU?
  3. What happens between reset and main()?

Read the lesson: What is a microcontroller? →

Hardware basics for software developers

  1. Why does an LED need a series resistor, and how do you choose its value?
  2. What happens if you leave a GPIO input floating?
  3. How do you connect a 5 V sensor output to a 3.3 V microcontroller?
  4. Why does I2C need pull-up resistors, and what goes wrong if they are too large?
  5. What is the difference between absolute maximum ratings and recommended operating conditions?

Read the lesson: Hardware basics for software developers →

C for embedded

  1. How do you set, clear and toggle one bit without changing the others?
  2. What does volatile do, and when is it required?
  3. Why use uint32_t instead of int for a register?

Read the lesson: C for embedded →

GPIO: pins in and out

  1. What is a pull-up resistor and why does a button need one?
  2. What is switch bounce and how do you handle it?
  3. Why must you enable a peripheral clock before using it?

Read the lesson: GPIO: pins in and out →

Timers and interrupts

  1. What is the difference between polling and interrupts?
  2. Why should an interrupt routine be short?
  3. How do you choose PSC and ARR for an interrupt every second?

Read the lesson: Timers and interrupts →

UART, I2C and SPI

  1. When would you choose SPI instead of I2C?
  2. Why does I2C need pull-up resistors?
  3. What does a NACK on the I2C bus tell you?

Read the lesson: UART, I2C and SPI →

ADC: reading the analog world

  1. What limits the accuracy of an ADC reading?
  2. What happens if you sample a signal too slowly?
  3. How do you turn a raw 12-bit reading into volts?

Read the lesson: ADC: reading the analog world →

RTOS: many jobs on one chip

  1. What is priority inversion and how is it solved?
  2. Queue or global variable: how should two tasks share data?
  3. When is a simple loop better than an RTOS?

Read the lesson: RTOS: many jobs on one chip →

PWM, state machines and more

  1. How does PWM control the speed of a motor?
  2. Why design firmware as a state machine?
  3. How do you feed a watchdog safely when several tasks run?

Read the lesson: PWM, state machines and more →

The full picture

  1. Walk me through what happens from power on to the first sensor reading.
  2. How does the code get from your computer into the chip?

Read the lesson: The full picture →

The road to senior

  1. Tell me about a bug that only happened on real hardware, and how you found it.
  2. How would you design firmware updates so a device can never be bricked?

Read the lesson: The road to senior →

In the app, the lessons come alive

The lessons have interactive demos and hands-on labs checked on your board in the app. These pages are the readable version: the demos are described in words, and the labs need the app.

Download BoardPilot Try the lessons in your browser

← All lessons