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?
- What is the difference between a microcontroller and a microprocessor?
- Where do the code and the variables live in an MCU?
- What happens between reset and main()?
Read the lesson: What is a microcontroller? →
Hardware basics for software developers
- Why does an LED need a series resistor, and how do you choose its value?
- What happens if you leave a GPIO input floating?
- How do you connect a 5 V sensor output to a 3.3 V microcontroller?
- Why does I2C need pull-up resistors, and what goes wrong if they are too large?
- What is the difference between absolute maximum ratings and recommended operating conditions?
Read the lesson: Hardware basics for software developers →
C for embedded
- How do you set, clear and toggle one bit without changing the others?
- What does volatile do, and when is it required?
- Why use uint32_t instead of int for a register?
Read the lesson: C for embedded →
GPIO: pins in and out
- What is a pull-up resistor and why does a button need one?
- What is switch bounce and how do you handle it?
- Why must you enable a peripheral clock before using it?
Read the lesson: GPIO: pins in and out →
Timers and interrupts
- What is the difference between polling and interrupts?
- Why should an interrupt routine be short?
- How do you choose PSC and ARR for an interrupt every second?
Read the lesson: Timers and interrupts →
UART, I2C and SPI
- When would you choose SPI instead of I2C?
- Why does I2C need pull-up resistors?
- What does a NACK on the I2C bus tell you?
Read the lesson: UART, I2C and SPI →
ADC: reading the analog world
- What limits the accuracy of an ADC reading?
- What happens if you sample a signal too slowly?
- 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
- What is priority inversion and how is it solved?
- Queue or global variable: how should two tasks share data?
- When is a simple loop better than an RTOS?
Read the lesson: RTOS: many jobs on one chip →
PWM, state machines and more
- How does PWM control the speed of a motor?
- Why design firmware as a state machine?
- How do you feed a watchdog safely when several tasks run?
Read the lesson: PWM, state machines and more →
The full picture
- Walk me through what happens from power on to the first sensor reading.
- How does the code get from your computer into the chip?
Read the lesson: The full picture →
The road to senior
- Tell me about a bug that only happened on real hardware, and how you found it.
- 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.